All Questions
4 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)
...
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
...
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 ...
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 = ...