[Mono-bugs] [Bug 78139][Nor] New - Bad implementation of SynchronizationContext.Post()

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Apr 19 04:08:27 EDT 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by flipper98 at gmx.net.


--- shadow/78139	2006-04-19 04:08:26.000000000 -0400
+++ shadow/78139.tmp.24440	2006-04-19 04:08:26.000000000 -0400
@@ -0,0 +1,36 @@
+Bug#: 78139
+Product: Mono: Class Libraries
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: flipper98 at gmx.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Bad implementation of SynchronizationContext.Post()
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The Post() Method of the System.Threading.SynchronizationContext class is
+implemented the following way:
+d.BeginIvoke(state, null, null);
+This is fine as long as no exception is thrown from within the function
+delegate d points to. If an exception occurs, nobody will ever notice it as
+it will be suppressed until d.EndInvoke() is called.
+A proper implemetation would call:
+ThreadPool.QueueUserWorkItem(new WaitCallback(d), state);
+The difference being that ThreadPool.QueueUserWorkItem() will not suppress
+exceptions thrown by the WaitCallback delegate (assumed mono implements
+ThreadPool.QueueUserWorkItem correctly(?)).

More information about the mono-bugs mailing list