Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Jobs for irregular tasks, managed data access.

Discussion in 'Entity Component System' started by Xisor, Jan 19, 2019.

  1. Xisor

    Xisor

    Joined:
    Jan 30, 2016
    Posts:
    8
    I have a long running task mostly io bound which should run in background, allocate managed memory and do stuff. Task takes a pretty much amount of time, because of lots of io access and string parsing involved. IJob currently is not suitable for such things, cause it can't work with reference types and the whole design behind jobs looks like they are made for regular frame tasks. Creating a managed thread is a workaround of that, but now Unity has its own threadpool for workers, so maybe there is a more effective way to ask a background thread to do some task. Unity already have such API for async assets loading for example but i can't find any way to launch user-defined async operation. Not sure its a right place to ask, but maybe there's something like an irregular/background job?
     
    learc83 and JesOb like this.
  2. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,081
    also want to know :)
     
  3. tripodsgames

    tripodsgames

    Joined:
    Mar 19, 2016
    Posts:
    4