Skip to content

Optimize (async) token to lazily initialize WaitHandle #667

Open
@drieseng

Description

@drieseng

Similar to what we do for AsyncResult, we should only initialize the WaitHandle we need to wait for the operation to complete.

We should add a Wait(TimeSpan) method to Token, and have it implement IDisposable.

When the operation completes synchronously, we can avoid creating the WaitHandle altogether.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions