Difference Lock, Monitor, Mutex's

1. Mutex is a token run when a thread get this token, token want to get another thread must wait until the thread releases the token to get a token. Thread does not have ownership of the token is not released.

2. Mutex (false, "string") in the string is the key token, or the token name can be called as cross-process Mutex is, the entire system will have only a token presence so, that you a thread in an application has been in the ownership of the Mutex that another thread in another thread he must want to wait.

Guess you like

Origin www.cnblogs.com/raincedar/p/12157573.html