Besonderhede van voorbeeld: -98660427502400990

Metadata

Data

English[en]
This reduction in contention dramatically reduces the synchronization costs compared to a traditional thread-pool-based approach. Furthermore, the last-in-first-out (LIFO) ordering of tasks implied by such an approach means that the largest tasks sit at the tail of the deque, and therefore when another thread has to steal a task, it steals a large one that can be decomposed into smaller ones, reducing the need to steal again in the near future.
Chinese[zh]
跟传统的基于线程池的方法相比,减少争用会大大降低同步成本。 此外,这种方法暗含的后进先出(last-in-first-out,LIFO)任务排队机制意味着最大的任务排在队列的尾部,当另一个线程需要窃取任务时,它将得到一个能够分解成多个小任务的任务,从而避免了在未来窃取任务。

History

Your action: