1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Doc for MainThreadExecutor to lay out why it exists

This commit is contained in:
Ross McFarland
2017-03-28 13:35:49 -07:00
parent d51c2b41b8
commit 298fc2cdbf

View File

@@ -38,6 +38,13 @@ class _AggregateTarget(object):
class MainThreadExecutor(object):
'''
Dummy executor that runs things on the main call during the involcation of
submit, but still returns a future object with the result. This allows code
to be written to handle async, even in the case where we don't want to use
multiple threads/workers and would prefer that things flow as if
traditionally written.
'''
def submit(self, func, *args, **kwargs):
future = Future()