MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / run

Method run

_pydev_runfiles/pydev_runfiles_xml_rpc.py:113–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

111 self.server = xmlrpclib.Server("http://%s:%s" % (pydev_localhost.get_localhost(), port), encoding=encoding)
112
113 def run(self):
114 while True:
115 kill_found = False
116 commands = []
117 command = self.notifications_queue.get(block=True)
118 if isinstance(command, KillServer):
119 kill_found = True
120 else:
121 assert isinstance(command, ParallelNotification)
122 commands.append(command.to_tuple())
123
124 try:
125 while True:
126 command = self.notifications_queue.get(block=False) # No block to create a batch.
127 if isinstance(command, KillServer):
128 kill_found = True
129 else:
130 assert isinstance(command, ParallelNotification)
131 commands.append(command.to_tuple())
132 except:
133 pass # That's OK, we're getting it until it becomes empty so that we notify multiple at once.
134
135 if commands:
136 try:
137 self.server.notifyCommands(commands)
138 except:
139 traceback.print_exc()
140
141 if kill_found:
142 self.finished = True
143 return
144
145
146# =======================================================================================================================

Callers 1

run_testsMethod · 0.45

Calls 4

notifyCommandsMethod · 0.80
getMethod · 0.45
appendMethod · 0.45
to_tupleMethod · 0.45

Tested by

no test coverage detected