-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix coroutines crash with MSVC (#522)
MSVC doesn't like when coroutine is destroyed inside final suspender's await_suspend(). Instead return false from it's await_ready() allowing compiler's injected code to destroy coroutine automatically. In this case we also need to make sure that out Coroutine<> object doesn't destroy coroutine automatically since it will result in double free (we call completion callback in final suspender's await_ready() which immediately destroys Coroutine<>).
- Loading branch information
Showing
3 changed files
with
55 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters