Yicong-Huang commented on code in PR #4424:
URL: https://github.com/apache/texera/pull/4424#discussion_r3153463234
##########
amber/src/main/python/core/runnables/main_loop.py:
##########
@@ -329,7 +330,7 @@ def _process_ecm(self, ecm_element: ECMElement):
if ecm.ecm_type != EmbeddedControlMessageType.NO_ALIGNMENT:
self.context.pause_manager.resume(PauseType.ECM_PAUSE)
-
+ self._switch_context()
Review Comment:
ideally, besides waiting on debugger, where the thread has to wait on CP to
receive the next message, at all places use `switch context` should have no
harm besides wasted CPU. If you have message that could be processed by CP or
DP, and using a wrong `switch_context` would cause the massage be handled by
the wrong process, then I would blame the design of the message: The message
should only be processed by one of CP or DP, not both.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]