Answer the question
In order to leave comments, you need to log in
Threads in python, what are they for?
Good afternoon friends!
I just can’t figure out what threads are used for in python, given that there is a GIL. all the examples on the web are based on running the timer in threads. That does not give an understanding of the issue at all. Those. why it might be needed.
If for IO operations, then there is after all asycio.
Is there a good article on this topic that would describe the actual use of threads, with a description of the reason for their use?
Maybe there is a book where real use cases are explained?
Answer the question
In order to leave comments, you need to log in
The issue of threads has nothing to do specifically with python. This is generally from programming as such.
their purpose is to parallelize operations when it makes sense.
a simple example is an archiver, a file manager, a utility for load testing.
https://geekbrains.ru/posts/python_threading_part1
https://geekbrains.ru/posts/python_multithreading_pt2
https://habr.com/ru/company/otus/blog/458694/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question