Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import vibe.d;
- import std.stdio;
- const NTHREADS = 10000;
- void main() {
- runTask({
- auto tasks = new Task[NTHREADS];
- StopWatch sw;
- sw.start();
- foreach(ref task; tasks) task = runTask({
- sleep(100.msecs);
- });
- foreach(ref task; tasks) task.join();
- sw.stop();
- writeln(sw.peek().msecs, "ms");
- exitEventLoop();
- });
- runEventLoop();
- }
Advertisement
Add Comment
Please, Sign In to add comment