1

I have using FastAPI for a web api and I am using also python context vars. I know Uvicorn workers can fulfill many requests on multiple concurrent tasks.

Are those tasks are running in the same context ? If I set a context var in one task, It can be read in the other?

Assem
  • 11,574
  • 5
  • 59
  • 97
  • Have you found the solution? I've got `ValueError: at 0x3e7222676d80> was created in a different Context` while using uvicorn and hypercorn workers – Nikita Davydov Nov 16 '20 at 15:13
  • we made a different implementation, I will share a pseaudo solution later – Assem Nov 21 '20 at 17:30

0 Answers0