mirror of https://github.com/deavmi/libsnooze
Compare commits
2 Commits
bca816d026
...
8d9db7f91a
Author | SHA1 | Date |
---|---|---|
Tristan B. Velloza Kildaire | 8d9db7f91a | |
Tristan B. Velloza Kildaire | 487d6d61c4 |
|
@ -625,55 +625,4 @@ unittest
|
|||
thread1.join();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// unittest
|
||||
// {
|
||||
// Event event = new Event();
|
||||
|
||||
// class TestThread : Thread
|
||||
// {
|
||||
// private Event event;
|
||||
|
||||
// this(Event event)
|
||||
// {
|
||||
// super(&worker);
|
||||
// this.event = event;
|
||||
// }
|
||||
|
||||
// public void worker()
|
||||
// {
|
||||
// writeln("("~to!(string)(Thread.getThis().id())~") Thread is waiting...");
|
||||
|
||||
// try
|
||||
// {
|
||||
// /* Wait */
|
||||
// event.wait();
|
||||
// }
|
||||
// catch(InterruptedException e)
|
||||
// {
|
||||
// writeln("Had an interrupt");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// TestThread thread1 = new TestThread(event);
|
||||
// thread1.start();
|
||||
|
||||
// Thread.sleep(dur!("seconds")(10));
|
||||
// writeln("Main thread is going to notify two threads");
|
||||
|
||||
|
||||
|
||||
|
||||
// // TODO: Add assert to check
|
||||
|
||||
// /* Wake up all sleeping on this event */
|
||||
// // event.notifyAll();
|
||||
|
||||
// import core.thread.osthread : getpid;
|
||||
// writeln("Cur pid: ", getpid());
|
||||
|
||||
// /* Wait for all threads to exit */
|
||||
// thread1.join();
|
||||
// }
|
||||
// TODO: Interruption test
|
Loading…
Reference in New Issue