Skip to main content

All Questions

0 votes
0 answers
228 views

How to use both Python multiprocessing and asyncio?

import asyncio import httpx from datetime import datetime async def request_test(url): async with httpx.AsyncClient() as client: r = await client.get(url, timeout=None, headers=None) ...
KIMJAEMIN's user avatar
0 votes
0 answers
194 views

Change log level dynamically from asyncio outside module

I need to dynamically change log level without reloading any modules. For this, I am using a combination of asyncio and multiprocessing (both for the bigger program that I am writing). log_config.py ...
Vivek Kalyanarangan's user avatar
4 votes
1 answer
933 views

How to use multiprocessing.Event in an asyncio event loop?

I am using the multiprocessing module to create a Process. In this child process, it will run an asyncio event loop, and in the parent process, I am not. How can I use syncronization primitives for ...
dzil123's user avatar
  • 57
0 votes
0 answers
2k views

Is a change made to contextvars in a process pool not propagated to the main process running the asyncio loop

Below is the code snippet that I ran: from concurrent.futures import ProcessPoolExecutor import asyncio import contextvars ctx = contextvars.ContextVar('ctx', default=None) pool = ...
6harat's user avatar
  • 632