Bug 24644 - Monitor.Exit does not throw if exited from a different thread
Summary: Monitor.Exit does not throw if exited from a different thread
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-11-19 06:00 UTC by Konrad Kruczyński
Modified: 2016-04-16 07:58 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

A program that shows the described behaviour. (696 bytes, application/octet-stream)
2014-11-19 06:00 UTC, Konrad Kruczyński

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Konrad Kruczyński 2014-11-19 06:00:48 UTC
Created attachment 8799 [details]
A program that shows the described behaviour.

Consider an attached program. Due to yield and parallel foreach nature lock exit happens from a different thread than enter. This results in hang instead of an exception. On .NET such exception is thrown.