-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow AsyncCallback to be used with lambda (#39717)
Summary: Pull Request resolved: #39717 AsyncCallback is a better abstraction than the current usage of WeakCallbackWrapper and RAIICallbackWrapperDestroyer, and has way fewer gotchas. Making a few changes here to make it easier to use in various scenarios and match the behaviour we're already seeing in CallbackWrapper. 1) Remove the explicit copy constructor, since this prevents an automatic move constructor from being generated 2) Add a call variant which takes a lambda, for callers which need to manually create JSI arguments 3) Ignore AsyncCallback invocations when the underlying runtime has gone away. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D49684248 fbshipit-source-id: 8b49ec22cc409572ead80a85b10a190994bf0dd5
- Loading branch information
1 parent
f174f02
commit 0e10ee6
Showing
1 changed file
with
51 additions
and
19 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