-
-
Notifications
You must be signed in to change notification settings - Fork 21
Thread
CD2 edited this page Feb 8, 2023
·
2 revisions
A thread variable can be defined by specifying a global function enclosed in !? after the thread keyword. Threads cannot be passed by reference. You cannot pass an anonymous function to a thread. Variables that cannot be copied by assignment to a thread cannot be passed by value.
void f(){}
thread!f? t..(); // Thread call with ..
<wait>(t); // wait for the thread to finish