Have you checked whether enqueueing an element like this is thread safe?  Or might you need to wrap that in a synchronize call?