Outstanding intercurrent library Util.concurrent is offerred after Java 5, .net
The Util.concurrent in Java offerred in the bag kind of LockSupport, util.concurrent wraps a lot of keys to realize need to call LockSupport. If need the Util.concurrent Bao Qian of a Java to move,arrive in C# , lockSupport kind migratory it is inevitable question.
In Java, lockSupport kind be like lower part law:
After calling LockSupport.park when Cheng of a line, line Cheng can stop download, be similar to Object.wait, or the System.Threading.Monitor.Wait in.NET. But the problem is the Monitor.wait in the Object.wait in Java and.NET, need a WaitObject, this problem once perplexed me, turned over JDK 6 to realize a source for this, going to what discover finally to settle way is very simple however, the ground floor that also need not understand JDK realizes a source.
Among them Slot need not need, but the LockSupport code of referenced JDK Util.concurrent is pleasant to the eye, the ThreadLocal) of use Slot(java is OK and convenient dog debug.
Previous12 Next