As an unrelated note (that issue is the same before and after these patches), the fact we add a stack variable to the queue list looks not great: if a thread gets force terminated the queue will be left with bad data in the list. As unfortunate as it sounds, we probably have to allocate queue entry elsewise using some cache?