diff --git a/src/controller/python/chip/ChipBluezMgr.py b/src/controller/python/chip/ChipBluezMgr.py index e480750b600af8..bacf383710eccd 100644 --- a/src/controller/python/chip/ChipBluezMgr.py +++ b/src/controller/python/chip/ChipBluezMgr.py @@ -807,7 +807,6 @@ def __init__(self, devMgr, logger=None): self.rx = None self.setInputHook(self.readlineCB) self.devMgr = devMgr - self.devMgr.SetBlockingCB(self.devMgrCB) def __del__(self): self.disconnect() diff --git a/src/controller/python/chip/ChipCoreBluetoothMgr.py b/src/controller/python/chip/ChipCoreBluetoothMgr.py index 3f792a5a4d2425..4a65f1e2377038 100644 --- a/src/controller/python/chip/ChipCoreBluetoothMgr.py +++ b/src/controller/python/chip/ChipCoreBluetoothMgr.py @@ -184,8 +184,6 @@ def __init__(self, devCtrl, logger=None): def __del__(self): self.disconnect() self.setInputHook(self.orig_input_hook) - self.devCtrl.SetBlockingCB(None) - self.devCtrl.SetBleEventCB(None) def devMgrCB(self): """A callback used by ChipDeviceCtrl.py to drive the OSX runloop while the diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 2ba7c584db927b..aca971e5d392f1 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -1591,11 +1591,6 @@ async def ReadEvent(self, nodeid: int, events: typing.List[typing.Union[ else: return res.events - def SetBlockingCB(self, blockingCB): - self.CheckIsActive() - - self._ChipStack.blockingCB = blockingCB - def SetIpk(self, ipk: bytes): self._ChipStack.Call( lambda: self._dmLib.pychip_DeviceController_SetIpk(self.devCtrl, ipk, len(ipk)) diff --git a/src/controller/python/chip/ChipStack.py b/src/controller/python/chip/ChipStack.py index b47c4639825da8..5fd0601ba204e7 100644 --- a/src/controller/python/chip/ChipStack.py +++ b/src/controller/python/chip/ChipStack.py @@ -165,8 +165,6 @@ def HandleChipThreadRun(callback): callback() self.cbHandleChipThreadRun = HandleChipThreadRun - # set by other modules(BLE) that require service by thread while thread blocks. - self.blockingCB = None # # Storage has to be initialized BEFORE initializing the stack, since the latter @@ -255,11 +253,7 @@ def CallAsyncWithCompleteCallback(self, callFunct): if not res.is_success: self.completeEvent.set() raise res.to_exception() - while not self.completeEvent.isSet(): - if self.blockingCB: - self.blockingCB() - - self.completeEvent.wait(0.05) + self.completeEvent.wait() if isinstance(self.callbackRes, ChipStackException): raise self.callbackRes return self.callbackRes