ez-a-sync 0.24.36__tar.gz → 0.24.38__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ez-a-sync might be problematic. Click here for more details.
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/PKG-INFO +1 -1
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_helpers.c +162 -89
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_helpers.pyx +6 -5
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/abstract.c +2072 -1972
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/abstract.pyx +21 -16
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/method.c +3967 -3884
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/method.pyx +18 -15
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/create_task.c +390 -388
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/create_task.pyx +5 -4
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/event.c +534 -435
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/event.pyx +12 -3
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/ez_a_sync.egg-info/PKG-INFO +1 -1
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.coverage +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.github/workflows/black.yaml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.github/workflows/codeql.yaml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.github/workflows/docs.yaml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.github/workflows/mypy.yaml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.github/workflows/pytest.yaml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.github/workflows/release.yaml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.gitignore +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/.sourcery.yaml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/LICENSE.txt +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/MANIFEST.in +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/Makefile +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/README.md +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/TODO +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/ENVIRONMENT_VARIABLES.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/__init__.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/_smart.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/_smart.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/_typing.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_descriptor.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_flags.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_flags.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_flags.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_helpers.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_helpers.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_kwargs.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_kwargs.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_kwargs.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/_meta.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/abstract.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/base.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/base.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/base.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/config.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/decorator.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/flags.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/function.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/function.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/function.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/method.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/method.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/cache/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/cache/memory.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/limiter.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/manager.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/manager.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/manager.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/modifiers/semaphores.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/property.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/property.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/property.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/a_sync/singleton.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/aliases.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/as_completed.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/as_completed.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/as_completed.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/as_completed.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/create_task.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/create_task.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/gather.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/gather.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/asyncio/gather.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/exceptions.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/executor.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/future.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/iter.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/iter.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/iter.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/__init__.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_debug.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_debug.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_debug.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_debug.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_loggable.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_loggable.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_loggable.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/_loggable.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/__init__.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/counter.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/counter.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/counter.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/counter.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/event.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/event.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/prio_semaphore.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/prio_semaphore.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/prio_semaphore.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/prio_semaphore.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/semaphore.c +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/semaphore.pxd +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/semaphore.pyi +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/locks/semaphore.pyx +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/primitives/queue.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/py.typed +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/sphinx/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/sphinx/ext.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/task.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/utils/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/a_sync/utils/iterators.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/Makefile +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/alabaster.css +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/basic.css +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/custom.css +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/doctools.js +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/documentation_options.js +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/file.png +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/language_data.js +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/minus.png +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/plus.png +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/pygments.css +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/searchtools.js +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/conf.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/index.rst +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/docs/make.bat +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/ez_a_sync.egg-info/SOURCES.txt +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/ez_a_sync.egg-info/dependency_links.txt +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/ez_a_sync.egg-info/not-zip-safe +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/ez_a_sync.egg-info/requires.txt +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/ez_a_sync.egg-info/top_level.txt +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/pyproject.toml +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/requirements-dev.txt +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/requirements.txt +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/setup.cfg +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/setup.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/__init__.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/modifiers/test_apply_semaphore.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_abstract.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_base.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_cache.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_decorator.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_limiter.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_meta.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_modified.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/a_sync/test_singleton.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/asyncio/test_as_completed.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/asyncio/test_create_task.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/asyncio/test_gather.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/conftest.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/executor.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/fixtures.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/primitives/test_counter.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/primitives/test_event.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/primitives/test_prio_semaphore.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/primitives/test_queue.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/primitives/test_semaphore.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/task/test_task.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/task/test_task_mapping_views.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/test_executor.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/test_future.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/test_helpers.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/test_iter.py +0 -0
- {ez_a_sync-0.24.36 → ez_a_sync-0.24.38}/tests/test_smart.py +0 -0
|
@@ -1521,13 +1521,16 @@ struct __pyx_obj_6a_sync_6a_sync_8_helpers___pyx_scope_struct____pyx_f_6a_sync_6
|
|
|
1521
1521
|
*
|
|
1522
1522
|
* @wraps(func) # <<<<<<<<<<<<<<
|
|
1523
1523
|
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
1524
|
-
*
|
|
1524
|
+
* loop = get_event_loop()
|
|
1525
1525
|
*/
|
|
1526
1526
|
struct __pyx_obj_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asyncify_wrap {
|
|
1527
1527
|
PyObject_HEAD
|
|
1528
1528
|
struct __pyx_obj_6a_sync_6a_sync_8_helpers___pyx_scope_struct____pyx_f_6a_sync_6a_sync_8_helpers__asyncify *__pyx_outer_scope;
|
|
1529
1529
|
PyObject *__pyx_v_args;
|
|
1530
|
+
PyObject *__pyx_v_cf_fut;
|
|
1531
|
+
PyObject *__pyx_v_fut;
|
|
1530
1532
|
PyObject *__pyx_v_kwargs;
|
|
1533
|
+
PyObject *__pyx_v_loop;
|
|
1531
1534
|
};
|
|
1532
1535
|
|
|
1533
1536
|
/* #### Code section: utility_code_proto ### */
|
|
@@ -2526,6 +2529,7 @@ static const char __pyx_k__2[] = ".";
|
|
|
2526
2529
|
static const char __pyx_k__5[] = "*";
|
|
2527
2530
|
static const char __pyx_k__6[] = "?";
|
|
2528
2531
|
static const char __pyx_k_gc[] = "gc";
|
|
2532
|
+
static const char __pyx_k_fut[] = "fut";
|
|
2529
2533
|
static const char __pyx_k_args[] = "args";
|
|
2530
2534
|
static const char __pyx_k_loop[] = "loop";
|
|
2531
2535
|
static const char __pyx_k_main[] = "__main__";
|
|
@@ -2538,6 +2542,7 @@ static const char __pyx_k_throw[] = "throw";
|
|
|
2538
2542
|
static const char __pyx_k_wraps[] = "wraps";
|
|
2539
2543
|
static const char __pyx_k_P_args[] = "P.args";
|
|
2540
2544
|
static const char __pyx_k_a_sync[] = "a_sync";
|
|
2545
|
+
static const char __pyx_k_cf_fut[] = "cf_fut";
|
|
2541
2546
|
static const char __pyx_k_enable[] = "enable";
|
|
2542
2547
|
static const char __pyx_k_import[] = "__import__";
|
|
2543
2548
|
static const char __pyx_k_kwargs[] = "kwargs";
|
|
@@ -2550,12 +2555,13 @@ static const char __pyx_k_P_kwargs[] = "P.kwargs";
|
|
|
2550
2555
|
static const char __pyx_k_functools[] = "functools";
|
|
2551
2556
|
static const char __pyx_k_isenabled[] = "isenabled";
|
|
2552
2557
|
static const char __pyx_k_exceptions[] = "exceptions";
|
|
2553
|
-
static const char __pyx_k_wrap_future[] = "wrap_future";
|
|
2554
2558
|
static const char __pyx_k_RuntimeError[] = "RuntimeError";
|
|
2559
|
+
static const char __pyx_k_chain_future[] = "_chain_future";
|
|
2555
2560
|
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
|
|
2556
2561
|
static const char __pyx_k_ASyncFunction[] = "ASyncFunction";
|
|
2557
2562
|
static const char __pyx_k_asyncify_wrap[] = "_asyncify_wrap";
|
|
2558
2563
|
static const char __pyx_k_asyncio_tasks[] = "asyncio.tasks";
|
|
2564
|
+
static const char __pyx_k_create_future[] = "create_future";
|
|
2559
2565
|
static const char __pyx_k_a_sync__typing[] = "a_sync._typing";
|
|
2560
2566
|
static const char __pyx_k_get_event_loop[] = "_get_event_loop";
|
|
2561
2567
|
static const char __pyx_k_new_event_loop[] = "new_event_loop";
|
|
@@ -2638,12 +2644,16 @@ typedef struct {
|
|
|
2638
2644
|
PyObject *__pyx_n_s_asyncio_futures;
|
|
2639
2645
|
PyObject *__pyx_n_s_asyncio_tasks;
|
|
2640
2646
|
PyObject *__pyx_n_s_await;
|
|
2647
|
+
PyObject *__pyx_n_s_cf_fut;
|
|
2648
|
+
PyObject *__pyx_n_s_chain_future;
|
|
2641
2649
|
PyObject *__pyx_n_s_cline_in_traceback;
|
|
2642
2650
|
PyObject *__pyx_n_s_close;
|
|
2651
|
+
PyObject *__pyx_n_s_create_future;
|
|
2643
2652
|
PyObject *__pyx_kp_u_disable;
|
|
2644
2653
|
PyObject *__pyx_kp_u_enable;
|
|
2645
2654
|
PyObject *__pyx_n_s_exceptions;
|
|
2646
2655
|
PyObject *__pyx_n_s_functools;
|
|
2656
|
+
PyObject *__pyx_n_s_fut;
|
|
2647
2657
|
PyObject *__pyx_kp_u_gc;
|
|
2648
2658
|
PyObject *__pyx_n_s_get_event_loop;
|
|
2649
2659
|
PyObject *__pyx_n_s_get_event_loop_2;
|
|
@@ -2664,7 +2674,6 @@ typedef struct {
|
|
|
2664
2674
|
PyObject *__pyx_n_s_submit;
|
|
2665
2675
|
PyObject *__pyx_n_s_test;
|
|
2666
2676
|
PyObject *__pyx_n_s_throw;
|
|
2667
|
-
PyObject *__pyx_n_s_wrap_future;
|
|
2668
2677
|
PyObject *__pyx_n_s_wraps;
|
|
2669
2678
|
PyObject *__pyx_codeobj_;
|
|
2670
2679
|
PyObject *__pyx_tuple__3;
|
|
@@ -2740,12 +2749,16 @@ static int __pyx_m_clear(PyObject *m) {
|
|
|
2740
2749
|
Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_futures);
|
|
2741
2750
|
Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_tasks);
|
|
2742
2751
|
Py_CLEAR(clear_module_state->__pyx_n_s_await);
|
|
2752
|
+
Py_CLEAR(clear_module_state->__pyx_n_s_cf_fut);
|
|
2753
|
+
Py_CLEAR(clear_module_state->__pyx_n_s_chain_future);
|
|
2743
2754
|
Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
|
|
2744
2755
|
Py_CLEAR(clear_module_state->__pyx_n_s_close);
|
|
2756
|
+
Py_CLEAR(clear_module_state->__pyx_n_s_create_future);
|
|
2745
2757
|
Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
|
|
2746
2758
|
Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
|
|
2747
2759
|
Py_CLEAR(clear_module_state->__pyx_n_s_exceptions);
|
|
2748
2760
|
Py_CLEAR(clear_module_state->__pyx_n_s_functools);
|
|
2761
|
+
Py_CLEAR(clear_module_state->__pyx_n_s_fut);
|
|
2749
2762
|
Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
|
|
2750
2763
|
Py_CLEAR(clear_module_state->__pyx_n_s_get_event_loop);
|
|
2751
2764
|
Py_CLEAR(clear_module_state->__pyx_n_s_get_event_loop_2);
|
|
@@ -2766,7 +2779,6 @@ static int __pyx_m_clear(PyObject *m) {
|
|
|
2766
2779
|
Py_CLEAR(clear_module_state->__pyx_n_s_submit);
|
|
2767
2780
|
Py_CLEAR(clear_module_state->__pyx_n_s_test);
|
|
2768
2781
|
Py_CLEAR(clear_module_state->__pyx_n_s_throw);
|
|
2769
|
-
Py_CLEAR(clear_module_state->__pyx_n_s_wrap_future);
|
|
2770
2782
|
Py_CLEAR(clear_module_state->__pyx_n_s_wraps);
|
|
2771
2783
|
Py_CLEAR(clear_module_state->__pyx_codeobj_);
|
|
2772
2784
|
Py_CLEAR(clear_module_state->__pyx_tuple__3);
|
|
@@ -2820,12 +2832,16 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2820
2832
|
Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_futures);
|
|
2821
2833
|
Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_tasks);
|
|
2822
2834
|
Py_VISIT(traverse_module_state->__pyx_n_s_await);
|
|
2835
|
+
Py_VISIT(traverse_module_state->__pyx_n_s_cf_fut);
|
|
2836
|
+
Py_VISIT(traverse_module_state->__pyx_n_s_chain_future);
|
|
2823
2837
|
Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
|
|
2824
2838
|
Py_VISIT(traverse_module_state->__pyx_n_s_close);
|
|
2839
|
+
Py_VISIT(traverse_module_state->__pyx_n_s_create_future);
|
|
2825
2840
|
Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
|
|
2826
2841
|
Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
|
|
2827
2842
|
Py_VISIT(traverse_module_state->__pyx_n_s_exceptions);
|
|
2828
2843
|
Py_VISIT(traverse_module_state->__pyx_n_s_functools);
|
|
2844
|
+
Py_VISIT(traverse_module_state->__pyx_n_s_fut);
|
|
2829
2845
|
Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
|
|
2830
2846
|
Py_VISIT(traverse_module_state->__pyx_n_s_get_event_loop);
|
|
2831
2847
|
Py_VISIT(traverse_module_state->__pyx_n_s_get_event_loop_2);
|
|
@@ -2846,7 +2862,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2846
2862
|
Py_VISIT(traverse_module_state->__pyx_n_s_submit);
|
|
2847
2863
|
Py_VISIT(traverse_module_state->__pyx_n_s_test);
|
|
2848
2864
|
Py_VISIT(traverse_module_state->__pyx_n_s_throw);
|
|
2849
|
-
Py_VISIT(traverse_module_state->__pyx_n_s_wrap_future);
|
|
2850
2865
|
Py_VISIT(traverse_module_state->__pyx_n_s_wraps);
|
|
2851
2866
|
Py_VISIT(traverse_module_state->__pyx_codeobj_);
|
|
2852
2867
|
Py_VISIT(traverse_module_state->__pyx_tuple__3);
|
|
@@ -2910,12 +2925,16 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2910
2925
|
#define __pyx_n_s_asyncio_futures __pyx_mstate_global->__pyx_n_s_asyncio_futures
|
|
2911
2926
|
#define __pyx_n_s_asyncio_tasks __pyx_mstate_global->__pyx_n_s_asyncio_tasks
|
|
2912
2927
|
#define __pyx_n_s_await __pyx_mstate_global->__pyx_n_s_await
|
|
2928
|
+
#define __pyx_n_s_cf_fut __pyx_mstate_global->__pyx_n_s_cf_fut
|
|
2929
|
+
#define __pyx_n_s_chain_future __pyx_mstate_global->__pyx_n_s_chain_future
|
|
2913
2930
|
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
|
|
2914
2931
|
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
|
|
2932
|
+
#define __pyx_n_s_create_future __pyx_mstate_global->__pyx_n_s_create_future
|
|
2915
2933
|
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
|
|
2916
2934
|
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
|
|
2917
2935
|
#define __pyx_n_s_exceptions __pyx_mstate_global->__pyx_n_s_exceptions
|
|
2918
2936
|
#define __pyx_n_s_functools __pyx_mstate_global->__pyx_n_s_functools
|
|
2937
|
+
#define __pyx_n_s_fut __pyx_mstate_global->__pyx_n_s_fut
|
|
2919
2938
|
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
|
|
2920
2939
|
#define __pyx_n_s_get_event_loop __pyx_mstate_global->__pyx_n_s_get_event_loop
|
|
2921
2940
|
#define __pyx_n_s_get_event_loop_2 __pyx_mstate_global->__pyx_n_s_get_event_loop_2
|
|
@@ -2936,7 +2955,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
|
|
|
2936
2955
|
#define __pyx_n_s_submit __pyx_mstate_global->__pyx_n_s_submit
|
|
2937
2956
|
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
|
|
2938
2957
|
#define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
|
|
2939
|
-
#define __pyx_n_s_wrap_future __pyx_mstate_global->__pyx_n_s_wrap_future
|
|
2940
2958
|
#define __pyx_n_s_wraps __pyx_mstate_global->__pyx_n_s_wraps
|
|
2941
2959
|
#define __pyx_codeobj_ __pyx_mstate_global->__pyx_codeobj_
|
|
2942
2960
|
#define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3
|
|
@@ -3631,7 +3649,7 @@ static PyObject *__pyx_gb_6a_sync_6a_sync_8_helpers_9_asyncify_2generator(__pyx_
|
|
|
3631
3649
|
*
|
|
3632
3650
|
* @wraps(func) # <<<<<<<<<<<<<<
|
|
3633
3651
|
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
3634
|
-
*
|
|
3652
|
+
* loop = get_event_loop()
|
|
3635
3653
|
*/
|
|
3636
3654
|
|
|
3637
3655
|
/* Python wrapper */
|
|
@@ -3722,7 +3740,7 @@ static PyObject *__pyx_gb_6a_sync_6a_sync_8_helpers_9_asyncify_2generator(__pyx_
|
|
|
3722
3740
|
PyObject *__pyx_t_1 = NULL;
|
|
3723
3741
|
PyObject *__pyx_t_2 = NULL;
|
|
3724
3742
|
PyObject *__pyx_t_3 = NULL;
|
|
3725
|
-
|
|
3743
|
+
unsigned int __pyx_t_4;
|
|
3726
3744
|
int __pyx_lineno = 0;
|
|
3727
3745
|
const char *__pyx_filename = NULL;
|
|
3728
3746
|
int __pyx_clineno = 0;
|
|
@@ -3743,84 +3761,125 @@ static PyObject *__pyx_gb_6a_sync_6a_sync_8_helpers_9_asyncify_2generator(__pyx_
|
|
|
3743
3761
|
/* "a_sync/a_sync/_helpers.pyx":100
|
|
3744
3762
|
* @wraps(func)
|
|
3745
3763
|
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
3746
|
-
*
|
|
3747
|
-
*
|
|
3748
|
-
*
|
|
3764
|
+
* loop = get_event_loop() # <<<<<<<<<<<<<<
|
|
3765
|
+
* fut = loop.create_future()
|
|
3766
|
+
* cf_fut = submit(func, *args, **kwargs)
|
|
3749
3767
|
*/
|
|
3750
3768
|
__Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error))
|
|
3751
|
-
|
|
3752
|
-
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_wrap_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
|
|
3769
|
+
__pyx_t_1 = __pyx_f_6a_sync_6a_sync_8_helpers_get_event_loop(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
|
|
3753
3770
|
__Pyx_GOTREF(__pyx_t_1);
|
|
3771
|
+
__Pyx_GIVEREF(__pyx_t_1);
|
|
3772
|
+
__pyx_cur_scope->__pyx_v_loop = __pyx_t_1;
|
|
3773
|
+
__pyx_t_1 = 0;
|
|
3754
3774
|
|
|
3755
3775
|
/* "a_sync/a_sync/_helpers.pyx":101
|
|
3756
3776
|
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
3757
|
-
*
|
|
3758
|
-
*
|
|
3759
|
-
*
|
|
3760
|
-
* )
|
|
3777
|
+
* loop = get_event_loop()
|
|
3778
|
+
* fut = loop.create_future() # <<<<<<<<<<<<<<
|
|
3779
|
+
* cf_fut = submit(func, *args, **kwargs)
|
|
3780
|
+
* _chain_future(cf_fut, fut)
|
|
3761
3781
|
*/
|
|
3762
3782
|
__Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error))
|
|
3763
|
-
|
|
3764
|
-
if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 101, __pyx_L1_error) }
|
|
3765
|
-
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
|
|
3766
|
-
__Pyx_GOTREF(__pyx_t_2);
|
|
3767
|
-
__Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_func);
|
|
3768
|
-
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_func);
|
|
3769
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_func)) __PYX_ERR(0, 101, __pyx_L1_error);
|
|
3770
|
-
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_cur_scope->__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
|
|
3771
|
-
__Pyx_GOTREF(__pyx_t_3);
|
|
3772
|
-
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3773
|
-
__pyx_t_2 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
|
|
3774
|
-
__Pyx_GOTREF(__pyx_t_2);
|
|
3775
|
-
__pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_submit, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
|
|
3776
|
-
__Pyx_GOTREF(__pyx_t_4);
|
|
3777
|
-
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3778
|
-
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3779
|
-
|
|
3780
|
-
/* "a_sync/a_sync/_helpers.pyx":100
|
|
3781
|
-
* @wraps(func)
|
|
3782
|
-
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
3783
|
-
* return await wrap_future( # <<<<<<<<<<<<<<
|
|
3784
|
-
* submit(func, *args, **kwargs),
|
|
3785
|
-
* loop=get_event_loop(),
|
|
3786
|
-
*/
|
|
3787
|
-
__Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error))
|
|
3788
|
-
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 100, __pyx_L1_error)
|
|
3783
|
+
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_loop, __pyx_n_s_create_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
|
|
3789
3784
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3790
|
-
|
|
3791
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 100, __pyx_L1_error);
|
|
3785
|
+
__pyx_t_3 = NULL;
|
|
3792
3786
|
__pyx_t_4 = 0;
|
|
3787
|
+
#if CYTHON_UNPACK_METHODS
|
|
3788
|
+
if (likely(PyMethod_Check(__pyx_t_2))) {
|
|
3789
|
+
__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
|
|
3790
|
+
if (likely(__pyx_t_3)) {
|
|
3791
|
+
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
|
|
3792
|
+
__Pyx_INCREF(__pyx_t_3);
|
|
3793
|
+
__Pyx_INCREF(function);
|
|
3794
|
+
__Pyx_DECREF_SET(__pyx_t_2, function);
|
|
3795
|
+
__pyx_t_4 = 1;
|
|
3796
|
+
}
|
|
3797
|
+
}
|
|
3798
|
+
#endif
|
|
3799
|
+
{
|
|
3800
|
+
PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
|
|
3801
|
+
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
|
|
3802
|
+
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3803
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
|
|
3804
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
3805
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3806
|
+
}
|
|
3807
|
+
__Pyx_GIVEREF(__pyx_t_1);
|
|
3808
|
+
__pyx_cur_scope->__pyx_v_fut = __pyx_t_1;
|
|
3809
|
+
__pyx_t_1 = 0;
|
|
3793
3810
|
|
|
3794
3811
|
/* "a_sync/a_sync/_helpers.pyx":102
|
|
3795
|
-
*
|
|
3796
|
-
*
|
|
3797
|
-
*
|
|
3798
|
-
* )
|
|
3799
|
-
*
|
|
3812
|
+
* loop = get_event_loop()
|
|
3813
|
+
* fut = loop.create_future()
|
|
3814
|
+
* cf_fut = submit(func, *args, **kwargs) # <<<<<<<<<<<<<<
|
|
3815
|
+
* _chain_future(cf_fut, fut)
|
|
3816
|
+
* return await fut
|
|
3800
3817
|
*/
|
|
3801
3818
|
__Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error))
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3819
|
+
if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_submit)) { __Pyx_RaiseClosureNameError("submit"); __PYX_ERR(0, 102, __pyx_L1_error) }
|
|
3820
|
+
if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_func)) { __Pyx_RaiseClosureNameError("func"); __PYX_ERR(0, 102, __pyx_L1_error) }
|
|
3821
|
+
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
|
|
3822
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
3823
|
+
__Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_func);
|
|
3824
|
+
__Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_func);
|
|
3825
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_func)) __PYX_ERR(0, 102, __pyx_L1_error);
|
|
3826
|
+
__pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_cur_scope->__pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error)
|
|
3827
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
3828
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
3829
|
+
__pyx_t_1 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
|
|
3830
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
3831
|
+
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_submit, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
|
|
3805
3832
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3806
|
-
|
|
3833
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3834
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
3835
|
+
__Pyx_GIVEREF(__pyx_t_3);
|
|
3836
|
+
__pyx_cur_scope->__pyx_v_cf_fut = __pyx_t_3;
|
|
3837
|
+
__pyx_t_3 = 0;
|
|
3838
|
+
|
|
3839
|
+
/* "a_sync/a_sync/_helpers.pyx":103
|
|
3840
|
+
* fut = loop.create_future()
|
|
3841
|
+
* cf_fut = submit(func, *args, **kwargs)
|
|
3842
|
+
* _chain_future(cf_fut, fut) # <<<<<<<<<<<<<<
|
|
3843
|
+
* return await fut
|
|
3844
|
+
*
|
|
3845
|
+
*/
|
|
3846
|
+
__Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error))
|
|
3847
|
+
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_chain_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
|
|
3848
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
3849
|
+
__pyx_t_2 = NULL;
|
|
3850
|
+
__pyx_t_4 = 0;
|
|
3851
|
+
#if CYTHON_UNPACK_METHODS
|
|
3852
|
+
if (unlikely(PyMethod_Check(__pyx_t_1))) {
|
|
3853
|
+
__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
|
|
3854
|
+
if (likely(__pyx_t_2)) {
|
|
3855
|
+
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
|
|
3856
|
+
__Pyx_INCREF(__pyx_t_2);
|
|
3857
|
+
__Pyx_INCREF(function);
|
|
3858
|
+
__Pyx_DECREF_SET(__pyx_t_1, function);
|
|
3859
|
+
__pyx_t_4 = 1;
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
#endif
|
|
3863
|
+
{
|
|
3864
|
+
PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_cf_fut, __pyx_cur_scope->__pyx_v_fut};
|
|
3865
|
+
__pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
|
|
3866
|
+
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3867
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
|
|
3868
|
+
__Pyx_GOTREF(__pyx_t_3);
|
|
3869
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
3870
|
+
}
|
|
3807
3871
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3808
3872
|
|
|
3809
|
-
/* "a_sync/a_sync/_helpers.pyx":
|
|
3810
|
-
*
|
|
3811
|
-
*
|
|
3812
|
-
* return await
|
|
3813
|
-
*
|
|
3814
|
-
*
|
|
3873
|
+
/* "a_sync/a_sync/_helpers.pyx":104
|
|
3874
|
+
* cf_fut = submit(func, *args, **kwargs)
|
|
3875
|
+
* _chain_future(cf_fut, fut)
|
|
3876
|
+
* return await fut # <<<<<<<<<<<<<<
|
|
3877
|
+
*
|
|
3878
|
+
* return _asyncify_wrap
|
|
3815
3879
|
*/
|
|
3816
|
-
__Pyx_TraceLine(
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
3820
|
-
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3821
|
-
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3822
|
-
__pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_t_3);
|
|
3823
|
-
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3880
|
+
__Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error))
|
|
3881
|
+
__Pyx_XDECREF(__pyx_r);
|
|
3882
|
+
__pyx_r = __Pyx_Coroutine_Yield_From(__pyx_generator, __pyx_cur_scope->__pyx_v_fut);
|
|
3824
3883
|
__Pyx_XGOTREF(__pyx_r);
|
|
3825
3884
|
if (likely(__pyx_r)) {
|
|
3826
3885
|
__Pyx_XGIVEREF(__pyx_r);
|
|
@@ -3831,11 +3890,11 @@ static PyObject *__pyx_gb_6a_sync_6a_sync_8_helpers_9_asyncify_2generator(__pyx_
|
|
|
3831
3890
|
__pyx_generator->resume_label = 1;
|
|
3832
3891
|
return __pyx_r;
|
|
3833
3892
|
__pyx_L4_resume_from_await:;
|
|
3834
|
-
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0,
|
|
3893
|
+
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 104, __pyx_L1_error)
|
|
3835
3894
|
__pyx_t_3 = __pyx_sent_value; __Pyx_INCREF(__pyx_t_3);
|
|
3836
3895
|
} else {
|
|
3837
3896
|
__pyx_t_3 = NULL;
|
|
3838
|
-
if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(0,
|
|
3897
|
+
if (__Pyx_PyGen_FetchStopIterationValue(&__pyx_t_3) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
|
|
3839
3898
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3840
3899
|
}
|
|
3841
3900
|
__pyx_r = NULL; __Pyx_ReturnWithStopIteration(__pyx_t_3);
|
|
@@ -3848,7 +3907,7 @@ static PyObject *__pyx_gb_6a_sync_6a_sync_8_helpers_9_asyncify_2generator(__pyx_
|
|
|
3848
3907
|
*
|
|
3849
3908
|
* @wraps(func) # <<<<<<<<<<<<<<
|
|
3850
3909
|
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
3851
|
-
*
|
|
3910
|
+
* loop = get_event_loop()
|
|
3852
3911
|
*/
|
|
3853
3912
|
|
|
3854
3913
|
/* function exit code */
|
|
@@ -3857,7 +3916,6 @@ static PyObject *__pyx_gb_6a_sync_6a_sync_8_helpers_9_asyncify_2generator(__pyx_
|
|
|
3857
3916
|
__Pyx_XDECREF(__pyx_t_1);
|
|
3858
3917
|
__Pyx_XDECREF(__pyx_t_2);
|
|
3859
3918
|
__Pyx_XDECREF(__pyx_t_3);
|
|
3860
|
-
__Pyx_XDECREF(__pyx_t_4);
|
|
3861
3919
|
__Pyx_AddTraceback("_asyncify_wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3862
3920
|
__pyx_L0:;
|
|
3863
3921
|
__Pyx_XDECREF(__pyx_r); __pyx_r = 0;
|
|
@@ -4048,7 +4106,7 @@ static PyObject *__pyx_f_6a_sync_6a_sync_8_helpers__asyncify(PyObject *__pyx_v_f
|
|
|
4048
4106
|
*
|
|
4049
4107
|
* @wraps(func) # <<<<<<<<<<<<<<
|
|
4050
4108
|
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
4051
|
-
*
|
|
4109
|
+
* loop = get_event_loop()
|
|
4052
4110
|
*/
|
|
4053
4111
|
__Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error))
|
|
4054
4112
|
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_wraps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
|
|
@@ -4110,12 +4168,12 @@ static PyObject *__pyx_f_6a_sync_6a_sync_8_helpers__asyncify(PyObject *__pyx_v_f
|
|
|
4110
4168
|
__pyx_v__asyncify_wrap = __pyx_t_2;
|
|
4111
4169
|
__pyx_t_2 = 0;
|
|
4112
4170
|
|
|
4113
|
-
/* "a_sync/a_sync/_helpers.pyx":
|
|
4114
|
-
*
|
|
4171
|
+
/* "a_sync/a_sync/_helpers.pyx":106
|
|
4172
|
+
* return await fut
|
|
4115
4173
|
*
|
|
4116
4174
|
* return _asyncify_wrap # <<<<<<<<<<<<<<
|
|
4117
4175
|
*/
|
|
4118
|
-
__Pyx_TraceLine(
|
|
4176
|
+
__Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error))
|
|
4119
4177
|
__Pyx_XDECREF(__pyx_r);
|
|
4120
4178
|
__Pyx_INCREF(__pyx_v__asyncify_wrap);
|
|
4121
4179
|
__pyx_r = __pyx_v__asyncify_wrap;
|
|
@@ -4368,7 +4426,10 @@ static void __pyx_tp_dealloc_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asy
|
|
|
4368
4426
|
PyObject_GC_UnTrack(o);
|
|
4369
4427
|
Py_CLEAR(p->__pyx_outer_scope);
|
|
4370
4428
|
Py_CLEAR(p->__pyx_v_args);
|
|
4429
|
+
Py_CLEAR(p->__pyx_v_cf_fut);
|
|
4430
|
+
Py_CLEAR(p->__pyx_v_fut);
|
|
4371
4431
|
Py_CLEAR(p->__pyx_v_kwargs);
|
|
4432
|
+
Py_CLEAR(p->__pyx_v_loop);
|
|
4372
4433
|
#if CYTHON_USE_FREELISTS
|
|
4373
4434
|
if (((int)(__pyx_freecount_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asyncify_wrap < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asyncify_wrap)))) {
|
|
4374
4435
|
__pyx_freelist_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asyncify_wrap[__pyx_freecount_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asyncify_wrap++] = ((struct __pyx_obj_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asyncify_wrap *)o);
|
|
@@ -4395,9 +4456,18 @@ static int __pyx_tp_traverse_6a_sync_6a_sync_8_helpers___pyx_scope_struct_1__asy
|
|
|
4395
4456
|
if (p->__pyx_v_args) {
|
|
4396
4457
|
e = (*v)(p->__pyx_v_args, a); if (e) return e;
|
|
4397
4458
|
}
|
|
4459
|
+
if (p->__pyx_v_cf_fut) {
|
|
4460
|
+
e = (*v)(p->__pyx_v_cf_fut, a); if (e) return e;
|
|
4461
|
+
}
|
|
4462
|
+
if (p->__pyx_v_fut) {
|
|
4463
|
+
e = (*v)(p->__pyx_v_fut, a); if (e) return e;
|
|
4464
|
+
}
|
|
4398
4465
|
if (p->__pyx_v_kwargs) {
|
|
4399
4466
|
e = (*v)(p->__pyx_v_kwargs, a); if (e) return e;
|
|
4400
4467
|
}
|
|
4468
|
+
if (p->__pyx_v_loop) {
|
|
4469
|
+
e = (*v)(p->__pyx_v_loop, a); if (e) return e;
|
|
4470
|
+
}
|
|
4401
4471
|
return 0;
|
|
4402
4472
|
}
|
|
4403
4473
|
#if CYTHON_USE_TYPE_SPECS
|
|
@@ -4672,12 +4742,16 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
|
|
|
4672
4742
|
{&__pyx_n_s_asyncio_futures, __pyx_k_asyncio_futures, sizeof(__pyx_k_asyncio_futures), 0, 0, 1, 1},
|
|
4673
4743
|
{&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1},
|
|
4674
4744
|
{&__pyx_n_s_await, __pyx_k_await, sizeof(__pyx_k_await), 0, 0, 1, 1},
|
|
4745
|
+
{&__pyx_n_s_cf_fut, __pyx_k_cf_fut, sizeof(__pyx_k_cf_fut), 0, 0, 1, 1},
|
|
4746
|
+
{&__pyx_n_s_chain_future, __pyx_k_chain_future, sizeof(__pyx_k_chain_future), 0, 0, 1, 1},
|
|
4675
4747
|
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
|
|
4676
4748
|
{&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
|
|
4749
|
+
{&__pyx_n_s_create_future, __pyx_k_create_future, sizeof(__pyx_k_create_future), 0, 0, 1, 1},
|
|
4677
4750
|
{&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
|
|
4678
4751
|
{&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
|
|
4679
4752
|
{&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1},
|
|
4680
4753
|
{&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
|
|
4754
|
+
{&__pyx_n_s_fut, __pyx_k_fut, sizeof(__pyx_k_fut), 0, 0, 1, 1},
|
|
4681
4755
|
{&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
|
|
4682
4756
|
{&__pyx_n_s_get_event_loop, __pyx_k_get_event_loop, sizeof(__pyx_k_get_event_loop), 0, 0, 1, 1},
|
|
4683
4757
|
{&__pyx_n_s_get_event_loop_2, __pyx_k_get_event_loop_2, sizeof(__pyx_k_get_event_loop_2), 0, 0, 1, 1},
|
|
@@ -4698,7 +4772,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
|
|
|
4698
4772
|
{&__pyx_n_s_submit, __pyx_k_submit, sizeof(__pyx_k_submit), 0, 0, 1, 1},
|
|
4699
4773
|
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
|
|
4700
4774
|
{&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
|
|
4701
|
-
{&__pyx_n_s_wrap_future, __pyx_k_wrap_future, sizeof(__pyx_k_wrap_future), 0, 0, 1, 1},
|
|
4702
4775
|
{&__pyx_n_s_wraps, __pyx_k_wraps, sizeof(__pyx_k_wraps), 0, 0, 1, 1},
|
|
4703
4776
|
{0, 0, 0, 0, 0, 0, 0}
|
|
4704
4777
|
};
|
|
@@ -4722,12 +4795,12 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
|
|
|
4722
4795
|
*
|
|
4723
4796
|
* @wraps(func) # <<<<<<<<<<<<<<
|
|
4724
4797
|
* async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
4725
|
-
*
|
|
4798
|
+
* loop = get_event_loop()
|
|
4726
4799
|
*/
|
|
4727
|
-
__pyx_tuple__3 = PyTuple_Pack(
|
|
4800
|
+
__pyx_tuple__3 = PyTuple_Pack(5, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_loop, __pyx_n_s_fut, __pyx_n_s_cf_fut); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 98, __pyx_L1_error)
|
|
4728
4801
|
__Pyx_GOTREF(__pyx_tuple__3);
|
|
4729
4802
|
__Pyx_GIVEREF(__pyx_tuple__3);
|
|
4730
|
-
__pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(0, 0, 0,
|
|
4803
|
+
__pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS|CO_COROUTINE, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync_a_sync__helpers_pyx, __pyx_n_s_asyncify_wrap, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 98, __pyx_L1_error)
|
|
4731
4804
|
|
|
4732
4805
|
/* "a_sync/a_sync/_helpers.pyx":15
|
|
4733
4806
|
*
|
|
@@ -5161,7 +5234,7 @@ if (!__Pyx_RefNanny) {
|
|
|
5161
5234
|
*
|
|
5162
5235
|
* from asyncio import iscoroutinefunction, new_event_loop, set_event_loop # <<<<<<<<<<<<<<
|
|
5163
5236
|
* from asyncio import get_event_loop as _get_event_loop
|
|
5164
|
-
* from asyncio.futures import
|
|
5237
|
+
* from asyncio.futures import _chain_future
|
|
5165
5238
|
*/
|
|
5166
5239
|
__Pyx_TraceLine(6,0,__PYX_ERR(0, 6, __pyx_L1_error))
|
|
5167
5240
|
__pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
|
|
@@ -5196,7 +5269,7 @@ if (!__Pyx_RefNanny) {
|
|
|
5196
5269
|
*
|
|
5197
5270
|
* from asyncio import iscoroutinefunction, new_event_loop, set_event_loop
|
|
5198
5271
|
* from asyncio import get_event_loop as _get_event_loop # <<<<<<<<<<<<<<
|
|
5199
|
-
* from asyncio.futures import
|
|
5272
|
+
* from asyncio.futures import _chain_future
|
|
5200
5273
|
* from functools import wraps
|
|
5201
5274
|
*/
|
|
5202
5275
|
__Pyx_TraceLine(7,0,__PYX_ERR(0, 7, __pyx_L1_error))
|
|
@@ -5217,28 +5290,28 @@ if (!__Pyx_RefNanny) {
|
|
|
5217
5290
|
/* "a_sync/a_sync/_helpers.pyx":8
|
|
5218
5291
|
* from asyncio import iscoroutinefunction, new_event_loop, set_event_loop
|
|
5219
5292
|
* from asyncio import get_event_loop as _get_event_loop
|
|
5220
|
-
* from asyncio.futures import
|
|
5293
|
+
* from asyncio.futures import _chain_future # <<<<<<<<<<<<<<
|
|
5221
5294
|
* from functools import wraps
|
|
5222
5295
|
*
|
|
5223
5296
|
*/
|
|
5224
5297
|
__Pyx_TraceLine(8,0,__PYX_ERR(0, 8, __pyx_L1_error))
|
|
5225
5298
|
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
|
|
5226
5299
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5227
|
-
__Pyx_INCREF(
|
|
5228
|
-
__Pyx_GIVEREF(
|
|
5229
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0,
|
|
5300
|
+
__Pyx_INCREF(__pyx_n_s_chain_future);
|
|
5301
|
+
__Pyx_GIVEREF(__pyx_n_s_chain_future);
|
|
5302
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_chain_future)) __PYX_ERR(0, 8, __pyx_L1_error);
|
|
5230
5303
|
__pyx_t_3 = __Pyx_Import(__pyx_n_s_asyncio_futures, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
|
|
5231
5304
|
__Pyx_GOTREF(__pyx_t_3);
|
|
5232
5305
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5233
|
-
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3,
|
|
5306
|
+
__pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_chain_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
|
|
5234
5307
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5235
|
-
if (PyDict_SetItem(__pyx_d,
|
|
5308
|
+
if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain_future, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
|
|
5236
5309
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5237
5310
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
5238
5311
|
|
|
5239
5312
|
/* "a_sync/a_sync/_helpers.pyx":9
|
|
5240
5313
|
* from asyncio import get_event_loop as _get_event_loop
|
|
5241
|
-
* from asyncio.futures import
|
|
5314
|
+
* from asyncio.futures import _chain_future
|
|
5242
5315
|
* from functools import wraps # <<<<<<<<<<<<<<
|
|
5243
5316
|
*
|
|
5244
5317
|
* from a_sync import exceptions
|
|
@@ -5,7 +5,7 @@ and converting synchronous functions to asynchronous ones.
|
|
|
5
5
|
|
|
6
6
|
from asyncio import iscoroutinefunction, new_event_loop, set_event_loop
|
|
7
7
|
from asyncio import get_event_loop as _get_event_loop
|
|
8
|
-
from asyncio.futures import
|
|
8
|
+
from asyncio.futures import _chain_future
|
|
9
9
|
from functools import wraps
|
|
10
10
|
|
|
11
11
|
from a_sync import exceptions
|
|
@@ -97,9 +97,10 @@ cdef object _asyncify(object func, object executor): # type: ignore [misc]
|
|
|
97
97
|
|
|
98
98
|
@wraps(func)
|
|
99
99
|
async def _asyncify_wrap(*args: P.args, **kwargs: P.kwargs) -> T:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
)
|
|
100
|
+
loop = get_event_loop()
|
|
101
|
+
fut = loop.create_future()
|
|
102
|
+
cf_fut = submit(func, *args, **kwargs)
|
|
103
|
+
_chain_future(cf_fut, fut)
|
|
104
|
+
return await fut
|
|
104
105
|
|
|
105
106
|
return _asyncify_wrap
|