MCPcopy Create free account
hub / github.com/StackStorm/st2 / cancel

Function cancel

st2common/st2common/util/concurrency.py:107–113  ·  view source on GitHub ↗
(green_thread, *args, **kwargs)

Source from the content-addressed store, hash-verified

105
106
107def cancel(green_thread, *args, **kwargs):
108 if CONCURRENCY_LIBRARY == "eventlet":
109 return green_thread.cancel(*args, **kwargs)
110 elif CONCURRENCY_LIBRARY == "gevent":
111 return green_thread.kill(*args, **kwargs)
112 else:
113 raise ValueError("Unsupported concurrency library")
114
115
116def kill(green_thread, *args, **kwargs):

Callers

nothing calls this directly

Calls 2

killMethod · 0.80
cancelMethod · 0.45

Tested by

no test coverage detected