Asyncronous task queue
I have one thread that delegates tasks over to another thread, which runs those tasks in a queue. These tasks are blocking tasks (database), that I want to be run in the correct order, first in first out.
Currently using BlockingQueue, but when testing it using junit, it can freeze the whole test. That's because after each test, this thread is waited on until it finishes. I have not found a good way to enable/disable the queue
How would one do this properly?
Currently using BlockingQueue, but when testing it using junit, it can freeze the whole test. That's because after each test, this thread is waited on until it finishes. I have not found a good way to enable/disable the queue
How would one do this properly?