Skip to content
This repository was archived by the owner on May 2, 2019. It is now read-only.
This repository was archived by the owner on May 2, 2019. It is now read-only.

Task.Delay cause tox offline #26

@randoms

Description

@randoms

In tox loop.

while (_running)
{
      if (_cancelTokenSource.IsCancellationRequested)
          break;

      int delay = DoIterate();
      await Task.Delay(delay);
}

Task.Delay was used to sleep for some time. But if the threads in thread pool are not enough, it will take 500ms to create a new thread. This may cause tox offline. I recommend to use Thread.sleep instead.

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