Patch for Review: PR/9254 and other Win32 Threading Fixes

Adam Megacz gcj@lists.megacz.com
Tue Jan 28 20:02:00 GMT 2003


"Ranjit Mathew" <rmathew@hotmail.com> writes:
> Right, so I would get to know if I'm not the owner of the critical
> section if TryEnterCriticalSection( ) fails, but if it succeeds,
> I'll have to use LeaveCriticalSection( ) *twice* to prevent
> SNAFU-ing up (ref. MSDN). That would, IMHO, make the code a bit
> weird to read.

Okay, that's cool.

BTW, does it make sense for the platform-independent code to implement
mutex ownership?  Or are there platforms where the OS can answer the
query "which thread is holding mutex X"?

  - a



More information about the Java mailing list