MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main_iter

Function main_iter

test/core/pthread/create.c:35–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void main_iter() {
36 static int main_adds = 0;
37 int worker_adds = sum++ - main_adds++;
38 printf("main iter %d : %d\n", main_adds, worker_adds);
39 if (worker_adds == NUM_THREADS * TOTAL) {
40 printf("done!\n");
41#ifndef ALLOW_SYNC
42 emscripten_cancel_main_loop();
43#endif
44 exit(0);
45 }
46}
47
48int main() {
49 // Create initial threads.

Callers 1

mainFunction · 0.85

Calls 2

printfFunction · 0.85
exitFunction · 0.50

Tested by

no test coverage detected