On the Internet, a bunch of disparate multi-threading information in Django. Some say that it rests on crutches, some argue that it does not exist at all ... Does Django have standard mechanisms for multithreading and how are things at all?

  • As far as I know, with all modern web servers, multithreading is not provided in principle, because nafig is not necessary (there is asynchronism, but this is a slightly different story). You better tell us why it is for you, and we will tell you how to do it most correctly - andreymal
  • 2
    The jung is usually run in several processes, not threads. For asynchronous tasks, use celery. Describe the task, while too abstract - FeroxTL
  • @andreymal Apache and nginx are not modern servers? Multithreading model is more common. - Alex78191
  • @ Alex78191 Apache is not modern and usually has multiprocessing instead of multi-threading, nginx is asynchronous and can even work with one worker without add. streams, and his workers are again processes and not streams - andreymal

1 answer 1

As said above, the server starts the jungle in the required number of processes. Junga itself is written in a synchronous style, and according to the developers, it cannot be rewritten in an asynchronous manner.

A multi-threading means dzhangi not provided. Nevertheless, no one bothers to open the necessary threads and processes by means of python itself.