Added volatile to prevent caching of pointers in queue (according to using of queue in thread pool)