But this is a horrible approach because this thread will need to busy-loop to detect a change in a reasonable time frame.
这是一种非常可怕的方法,因为线程需要在合理的时间范围内频繁地循环检测变化。
To wait all we do is put the thread into a busy loop (a spin).
为了让线程等待,我们只需将线程执行一个忙循环(自旋)。
To wait all we do is put the thread into a busy loop (a spin).
为了让线程等待,我们只需将线程执行一个忙循环(自旋)。
应用推荐