20,741
edits
m (→August 14: make it less obviously broken :-)) |
m (→August 14: sry) |
||
| Line 78: | Line 78: | ||
thread.newthread = func(code, thread_id) { | thread.newthread = func(code, thread_id) { | ||
counter.do ( counter.get() +=1 ); | counter.do ( func counter.get() +=1 ); # increment thread counter | ||
code(); | code(); # run callback in new thread | ||
counter.do (counter.get() -=1 ); | counter.do ( func counter.get() -=1 ); # decrement thread counter | ||
} | } | ||