Looks like it should work in theory, though it doesn't look it acquires/holds the lock during any useful operations other than to use wait/notify. This might work because you may not have any need...
Type: Posts; User: helloworld922
Looks like it should work in theory, though it doesn't look it acquires/holds the lock during any useful operations other than to use wait/notify. This might work because you may not have any need...
wait() and notify() are mechanisms for synchronization. They're used differently than sleep, who's use in a multi-threaded application is discouraged because the thread doesn't actually release any...