added spin to avoid (live?)locking of task queue by worker thread