Skip to content

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

@giovancris

Description

@giovancris

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions