MCPcopy Index your code
hub / github.com/python/cpython / run

Method run

Lib/concurrent/futures/thread.py:81–92  ·  view source on GitHub ↗
(self, ctx)

Source from the content-addressed store, hash-verified

79 self.task = task
80
81 def run(self, ctx):
82 if not self.future.set_running_or_notify_cancel():
83 return
84
85 try:
86 result = ctx.run(self.task)
87 except BaseException as exc:
88 self.future.set_exception(exc)
89 # Break a reference cycle with the exception 'exc'
90 self = None
91 else:
92 self.future.set_result(result)
93
94 __class_getitem__ = classmethod(types.GenericAlias)
95

Callers 1

_workerFunction · 0.45

Calls 3

set_exceptionMethod · 0.45
set_resultMethod · 0.45

Tested by

no test coverage detected