Queue fix

Pedro Gonnet requested to merge queue_fix into master

Separate adding and getting a task. Uses a double-ended queue to buffer incoming tasks. The buffer is then added to the actual queue whenever queue_gettask is called.

Peter, can you check if this doesn't break anything? Thanks!

Merge request reports