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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user