Regular API function

simResumeThreads / sim.resumeThreads

Description In conjunction with sim.setThreadResumeLocation, sim.resumeThreads allows specifying when and in which order threads are resumed. By default, CoppeliaSim doesn't use "regular" threads, but something similar to hybrid threads (which behave like coroutines, but can also behave like regular threads). This allows much more flexibility and execution control of the threads. Once a thread switched to another thread, it will resume execution at the beginning of next simulation pass by default. In order to also have full synchronization control between threads, you can assign a resume location and order to each thread. When sim.resumeThreads(x) is called, all threads that were assigned a resume location of x will be resumed. See also sim.setThreadResumeLocation, sim.setThreadSwitchTiming, sim.switchThread and sim.setThreadIsFree. This function can only be called in the main script.
C synopsis -
C parameters
C return value
Lua synopsis number count=sim.resumeThreads(number location)
Lua parameters
location: indicates a location value associated with threads (through the sim.setThreadResumeLocation function). Only threads with the same location value will be resumed.
Lua return values
result: number of resumed threads, or -1 in case of an error.

All regular API functions on one page