lib
lib copied to clipboard
Is it safe to call scheduler_add from a thread different then main
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?