I've tested an example from: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmutex.asp
And it doesn't work correctly with Mono. It uses 2 mutex no control 4 threads, lets see each one: t1Start: Waits to finish until all mutex are released t2Start: Waits until mutex 1 is released t3Start: Waits until any mutex is released (1 or 2) t4Start: Waits until mutex 2 is released The program launch the 4 threads and Release mutex 1 and then mutex 2. The output of the program shows: MutexSample.cs ... - Main Owns gM1 and gM2 t1Start started, Mutex.WaitAll(Mutex[]) t2Start started, gM1.WaitOne( ) t3Start started, Mutex.WaitAny(Mutex[]) t4Start started, gM2.WaitOne( ) - Main releases gM1 t2Start finished, gM1.WaitOne( ) - Main releases gM2 t4Start finished, gM2.WaitOne( ) And the program doesn't finish. As we can see only the threads t2 and t4 have finished, so the calls WaitAll and WaitAny of thread t1 and t3 don't work properly. The code can be found in the web of MS that I have specified at the beginning of the mail. Is it a bug? -- [aka Marble] Registered LiNUX user #140941 <> http://counter.li.org/ Socio #3274 de HispaLinux <> http://www.hispalinux.es Miembro de GPL URV <> http://www.gplurv.org GnuPG key: 0x0ED2CF9D <> pgp.escomposlinux.org
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmadadigitalmente
