queue: reduce test sleep times from 500-1000ms to 10ms
Replace long thread.sleep() calls with shorter 10ms delays to speed up
the test suite. The original 500-1000ms sleeps were unnecessarily long
for verifying thread synchronization behavior.
Add atomic state tracking to coordinate between test threads instead of
busy polling queue state (isFull/isEmpty). This eliminates unnecessary
mutex contention and makes the tests more deterministic.
Update the timing assertion from 900ms to 5ms to match the reduced
sleep durations.
The test suite now completes in ~30-50ms instead of 2-3 seconds while
still validating the same concurrency bugs (spurious wakeups, while vs
if loops in blocking operations).
Amp-Thread-ID: https://ampcode.com/threads/T-e4f31759-efff-4e5f-adce-9285d55adaf9
Co-authored-by: Amp <amp@ampcode.com>