Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async JSB Method execution Deadlock when spawning Tasks when ConcurrentTaskExecution = false #3293

Closed
amaitland opened this issue Nov 25, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@amaitland
Copy link
Member

  • What version of the product are you using?
    85.3.130

  • What architecture x86 or x64?
    Both

  • On what operating system?
    Any

  • Are you using WinForms, WPF or OffScreen?
    All

  • What steps will reproduce the problem?

    • Call an Async method from javascript that waits on a Task to complete that uses Task.Run

Example provided at https://github.com/kiewic/cefsharp-demo/blob/30cf8c4d7060bc41a1b0007507edf942e211cda0/CefSharpApp/BoundObject.cs

  • What is the expected output? What do you see instead?
    Method execution to complete successfully, instead it deadlocks

  • Please provide any additional information below.
    It's likely the LimitedConcurrencyLevelTaskScheduler used by MethodRunnerQueue is being inherited from the spawned Task. As there is only a single execution allowed the Task deadlocks.

@amaitland amaitland added the bug label Nov 25, 2020
@amaitland amaitland added this to the 86.0.x milestone Nov 25, 2020
@amaitland amaitland self-assigned this Nov 25, 2020
@amaitland
Copy link
Member Author

For reference https://stackoverflow.com/a/28375074

amaitland added a commit that referenced this issue Nov 25, 2020
To prevent subtasks from attempting to use our LimitedConcurrencyLevelTaskScheduler we need to
specify TaskCreationOptions.HideScheduler when creating the Task

Resolves #3293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant