Use tasks deque instead of queue to push tasks from read in front and to get tasks from front.
Add write queue size in dump msg.