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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

blucz opened this issue · comments

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

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.