Browse Source

Doc for MainThreadExecutor to lay out why it exists

pull/12/head
Ross McFarland 9 years ago
parent
commit
298fc2cdbf
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      octodns/manager.py

+ 7
- 0
octodns/manager.py 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()


Loading…
Cancel
Save