Under the preemptive model , as you learned earlier , threads can be interrupted in the middle of any section of code , except for an atomic block of code 正如前面所提到的,在搶占式模型中線程可以在代碼的任何一個部分的中間被打斷,除非那是一個原子操作代碼塊。
Alternatively , the java virtual machine can manage thread movement - under either a cooperative or preemptive model - from a ready queue onto the processor , where the thread can begin executing its program code 同樣, java虛擬機( jvm )也可以控制線程的移動在協(xié)作或搶先模型中從準備就緒隊列中將進程移到處理器中,于是該線程就可以開始執(zhí)行它的程序代碼。