B
B
beduin012020-06-08 17:54:48
Python
beduin01, 2020-06-08 17:54:48

Is it possible to use processes instead of co-routines?

I use Sanic + Python.
I don't need asynchrony as such. the site is internal and more than 3 people will not use it. The problem is that there is one blocking request to the database, which can hang the handler for a minute and the rest of the pages will not load.

I thought, is there any point in asynchrony, or can I just create several handler processes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-06-08
@bacon

You can, through run_in_executor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question