# Before looping, start the thread that writes JSON to the
# client, and the thread that reads output from the inferior.
start_thread("output reader", self._read_inferior_output)
- start_json_writer(self.out_stream, self.write_queue)
+ json_writer = start_json_writer(self.out_stream, self.write_queue)
start_thread("JSON reader", self._reader_thread)
while not self.done:
cmd = self.read_queue.get()
# JSON-writing thread, so that we can ensure that all
# responses are flushed to the client before exiting.
self.write_queue.put(None)
+ json_writer.join()
@in_dap_thread
def send_event_later(self, event, body=None):