We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fef0129 + 807fe82 commit 24675b5Copy full SHA for 24675b5
1 file changed
rootfs/api/utils.py
@@ -171,15 +171,14 @@ def async_run(tasks):
171
executor.shutdown(wait=True)
172
173
174
-@asyncio.coroutine
175
-def async_task(params, loop):
+async def async_task(params, loop):
176
"""
177
- performs an async task
+ Perform a task asynchronously.
178
179
# get the calling function
180
logger.debug('Running {}'.format(params))
181
# This executes a task in its own thread (in parallel)
182
- yield from loop.run_in_executor(None, params)
+ await loop.run_in_executor(None, params)
183
logger.debug('Finished running {}'.format(params))
184
185
0 commit comments