MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / send_task_command

Method send_task_command

pywebio/session/threadbased.py:116–129  ·  view source on GitHub ↗

向会话发送来自pywebio应用的消息 :param dict command: 消息

(self, command)

Source from the content-addressed store, hash-verified

114 thread.start()
115
116 def send_task_command(self, command):
117 """向会话发送来自pywebio应用的消息
118
119 :param dict command: 消息
120 """
121 if self.closed():
122 raise SessionClosedException()
123
124 self.unhandled_task_msgs.put(command)
125
126 if self._loop:
127 self._loop.call_soon_threadsafe(self._on_task_command, self)
128 else:
129 self._on_task_command(self)
130
131 def next_client_event(self):
132 # 函数开始不需要判断 self.closed()

Callers 1

main_taskMethod · 0.95

Calls 2

closedMethod · 0.65

Tested by

no test coverage detected