Skip to content

Using Await inside Promise can cause deadlock #15

Description

@Laurensvanrun

Thanks for taking the time to fill out a bug report! Please make sure to be as specific as possible in your description and title.

Issue description
When using .Await inside the execution of a-sync code an deadlock can occur. This can only occur if all threads execution a-sync code are blocked in .Await. This could be resolved by simulating yielding to the promises thread in .InternalAwait.

Possible solution
A possible solution would be to wait for the internal event with a time-out. If the time-out is reached before the event is signaled, we could extract the next promise from queue and try to execute that code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestinvalidThis doesn't seem right

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions