8
我只是想確保我在這裏理解一些東西。如果我獲得Monitor.Enter
或lock
的鎖定,在解鎖之前是否需要撥打Pulse
?Monitor.Pulse的目的
Monitor.Enter
Monitor.Pulse // Is that neccessary?
Monitor.Exit
我一直認爲,導致一個Monitor.Exit
調用會隱式調用Monitor.Pulse
。這實際上是真的嗎?
我不能完全肯定時將你會使用Pulse
。這就是造成混亂的原因。