Trheading a function with parameters in Processing
in
Share your Work
•
1 year ago
In Processing if you want that a function is executed in a diferent thread, you have just to use the following command:
thread("myFunc"); // this command creates a new thread and executes myFunc in that thread
void myFunc(){ ... }
The restriction is that 'myFunc' must be void, with no parameters and it could not be declared in a subclass in the sketch (it must be a public function in the pApplet class).
thread("myFunc"); // this command creates a new thread and executes myFunc in that thread
void myFunc(){ ... }
The restriction is that 'myFunc' must be void, with no parameters and it could not be declared in a subclass in the sketch (it must be a public function in the pApplet class).
If you nedd that 'myFunc' has parameters,
See this Post
enjoy this.