| 85 | } |
| 86 | |
| 87 | int main() { |
| 88 | std::cout << "Initializing...\n"; |
| 89 | |
| 90 | Engine engine; |
| 91 | auto wat = readFile("examples/threads.wat"); |
| 92 | Module module = Module::compile(engine, wat).unwrap(); |
| 93 | |
| 94 | std::vector<std::thread> threads; |
| 95 | threads.reserve(N_THREADS); |
| 96 | for (int i = 0; i < N_THREADS; i++) |
| 97 | threads.emplace_back(run_worker, engine, module); |
| 98 | for (auto &t : threads) |
| 99 | t.join(); |
| 100 | return 0; |
| 101 | } |