Regular API function


Description In conjunction with simSetThreadResumeLocation, simResumeThreads allows specifying when and in which order threads are resumed. By default, V-REP 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 simResumeThreads(x) is called, all threads that were assigned a resume location of x will be resumed. See also simSetThreadResumeLocation, simSetThreadSwitchTiming, simSwitchThread and simSetThreadIsFree. This function can only be called in the main script.
C synopsis -
C parameters
C return value
Lua synopsis number count=simResumeThreads(number location)
Lua parameters
location: indicates a location value associated with threads (through the simSetThreadResumeLocation 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