Mehrere Mutexe sperren
Ich frage mich, ob es möglich ist, mehrere Mutexe gleichzeitig zu sperren, wie zum Beispiel:
Mutex1.Lock();
{
Mutex2.Lock();
{
// Code locked by mutex 1 and 2.
}
Mutex2.Unlock();
// Code locked by mutex 1.
}
Mutex1.Unlock();
Es wäre in manchen Situationen sehr nützlich. Vielen Dank.