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

Function main

test/core/pthread/create.c:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48int main() {
49 // Create initial threads.
50 for (long i = 0; i < NUM_THREADS; ++i) {
51 CreateThread(i);
52 }
53
54 // if we don't allow sync pthread creation, the event loop must be reached for
55 // the worker to start up.
56#ifndef ALLOW_SYNC
57 emscripten_set_main_loop(main_iter, 0, 0);
58#else
59 while (1) {
60 main_iter();
61 }
62#endif
63 return 0;
64}

Callers

nothing calls this directly

Calls 2

main_iterFunction · 0.85
CreateThreadFunction · 0.70

Tested by

no test coverage detected