-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix makeUnorderedAsyncGenerator to not require generator draining
Summary: makeUnorderedAsyncGeneratorImpl allocates shared state on generator stack, which means that it requires the generator to be fully drained before it's destroyed. That's a contract that's very hard to enforce since in many cases it's fairly common for generators to be destroyed early. This diff just moves the shared state to be heap allocated and managed by a shared_ptr. Reviewed By: wangyishuo123 Differential Revision: D64585119 fbshipit-source-id: 2a42f943d1369e1fe48f46d6f11832458498744c
- Loading branch information
1 parent
1f71891
commit a714d80
Showing
2 changed files
with
46 additions
and
14 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