-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python] Keep reference to callback function on timeout (#30877)
* [Python] Keep reference to callback function on timeout When using a timeout when calling GetConnectedDeviceSync() the callback function DeviceAvailableCallback() gets potentially GC'ed. Make sure we hold a reference to the instance. * Use correct namespace for PyObject * Fix types in pychip_GetConnectedDeviceByNodeId * Call callback with context (self) * Correctly pass context * Use separate closure function
- Loading branch information
Showing
2 changed files
with
31 additions
and
21 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