Rewrite the thread stop in Queue
defining vars should cost less than function calls
Merge pull request #36 from meeh420/master

Rewrite