Skip to content

Commit 5b4b401

Browse files
committed
Added .flush to api
2 parents 7dbe539 + 7830643 commit 5b4b401

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tkthread/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ def nosync(self, func, *args, **kwargs):
182182
"""Non-blocking, no-synchronization call"""
183183
self._thread_queue.put((func, args, kwargs, None))
184184

185+
def flush(self):
186+
"""Flush all .nosync calls"""
187+
self(int) # a basic callable to put on the queue
188+
185189
def destroy(self):
186190
"""Destroy the TkThread object.
187191

0 commit comments

Comments
 (0)