向会话发送来自pywebio应用的消息 :param dict command: 消息
(self, command)
| 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() |
no test coverage detected