Skip to content

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

@blucz

Description

@blucz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions