jacksonh / manos

Manos is an easy to use, easy to test, high performance web application framework that stays out of your way and makes your life ridiculously simple.
Other
454 stars 61 forks source link

In Manos.IO.Managed/Context.cs, bad synchronization? #133

Open blucz opened 13 years ago

blucz commented 13 years ago

This is happening on windows with ms.net 4.0 with 78f3d167bdf0a18d6f2a11ecd0a43c7d9535b550

the 'outstanding' queue is protected by lock(syncRoot) in some places and lock(this) in other places.

Occasionally, I get a crash like this:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Manos.IO.Managed.Context.RunOnceNonblocking() in c:\sooloos\sooloos\Cola\Manos\src\Manos.IO\Manos.IO.Managed\Context.cs:line 124
   at Manos.IO.Managed.Context.RunOnce() in c:\sooloos\sooloos\Cola\Manos\src\Manos.IO\Manos.IO.Managed\Context.cs:line 107
   at Manos.IO.Managed.Context.Start() in c:\sooloos\sooloos\Cola\Manos\src\Manos.IO\Manos.IO.Managed\Context.cs:line 100

Changing all of the locks to reference syncRoot seems to fix the problem.