MCPcopy
hub / github.com/csev/py4e / _tkCall

Function _tkCall

code/graphics/graphics.py:196–207  ·  view source on GitHub ↗
(f, *args, **kw)

Source from the content-addressed store, hash-verified

194 _root.after(_POLL_INTERVAL, _tk_pump)
195
196def _tkCall(f, *args, **kw):
197 # execute synchronous call to f in the Tk thread
198 # this function should be used when a return value from
199 # f is required or when synchronizing the threads.
200 # call to _tkCall in Tk thread == DEADLOCK !
201 if not _thread_running:
202 raise GraphicsError, DEAD_THREAD
203 def func():
204 return f(*args, **kw)
205 _tk_request.put((func,True),True)
206 result = _tk_result.get(True)
207 return result
208
209def _tkExec(f, *args, **kw):
210 # schedule f to execute in the Tk thread. This function does

Callers 15

__init__Method · 0.85
closeMethod · 0.85
__autoflushMethod · 0.85
flushMethod · 0.85
getMouseMethod · 0.85
drawMethod · 0.85
undrawMethod · 0.85
moveMethod · 0.85
_reconfigMethod · 0.85
__init__Method · 0.85
getTextMethod · 0.85
cloneMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected