lib icon indicating copy to clipboard operation
lib copied to clipboard

Is it safe to call scheduler_add from a thread different then main

Open giovancris opened this issue 1 year ago • 0 comments

The documentation of scheduler_add method said that:

/* this function adds a task into the scheduler to execute and directly returns

  • if the pipe is not full. Otherwise the task is run directly. Should only be
  • called from main thread or within task handler. Input:
    • function to execute to process the task
    • userdata to call the execution function with
    • array size that will be divided over multible threads Output:
    • task handle used to wait for the task to finish or check if done. Needs to be persistent over the process of the task */

Is it not safe to call the scheduler_add method from the same thread where we call scheduler_start if this thread is different from the main thread?

giovancris avatar Apr 17 '24 16:04 giovancris