| 46 | } |
| 47 | |
| 48 | int 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 | } |
nothing calls this directly
no test coverage detected