Prevent some loops
Disable the pthread mutex for queue command, it will just stall otherwise.
Fixed some issues with flush and enforce task, still TODO in enforce_task_perform(). Notice difference between schedule_flush() and schedule_flush_type(), added TODO.