Skip to content

Commit 3258d29

Browse files
committed
Added loop option in AsyncioExecutor
1 parent c93143a commit 3258d29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graphql/execution/executors/asyncio.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55

66
class AsyncioExecutor(object):
77

8-
def __init__(self):
9-
self.loop = get_event_loop()
8+
def __init__(self, loop=None):
9+
if loop is None:
10+
loop = get_event_loop()
11+
self.loop = loop
1012
self.futures = []
1113

1214
def wait_until_finished(self):

0 commit comments

Comments
 (0)