Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
giovancris opened this issue Apr 17, 2024 · 0 comments
Open

Comments

@giovancris
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant