diff --git a/src/data/roadmaps/python/content/asynchrony@Mow7RvropbC4ZGDpcGZmw.md b/src/data/roadmaps/python/content/asynchrony@Mow7RvropbC4ZGDpcGZmw.md index 8c30eccd1..855b2ecc1 100644 --- a/src/data/roadmaps/python/content/asynchrony@Mow7RvropbC4ZGDpcGZmw.md +++ b/src/data/roadmaps/python/content/asynchrony@Mow7RvropbC4ZGDpcGZmw.md @@ -1 +1,8 @@ -# Asynchrony \ No newline at end of file +# Asynchrony + +Asynchronous programming, supported by asyncio, allows code to be executed without blocking, using async and await. This is especially useful for I/O tasks such as networking or file manipulation, allowing thousands of connections to be handled without blocking the main thread. + +Learn more about asynchronous programming in Python with the following resources: + +- [@official@Python AsyncIO library](https://docs.python.org/3/library/asyncio.html) +- [@article@Async IO in Python: A Complete Walkthrough](https://realpython.com/async-io-python/) diff --git a/src/data/roadmaps/python/content/concurrency@u4nRzWQ4zhDFMOrZ2I_uJ.md b/src/data/roadmaps/python/content/concurrency@u4nRzWQ4zhDFMOrZ2I_uJ.md index adf6818ed..2f8a97db5 100644 --- a/src/data/roadmaps/python/content/concurrency@u4nRzWQ4zhDFMOrZ2I_uJ.md +++ b/src/data/roadmaps/python/content/concurrency@u4nRzWQ4zhDFMOrZ2I_uJ.md @@ -1 +1,7 @@ -# Concurrency \ No newline at end of file +# Concurrency + +Concurrency in Python allows multiple tasks to be executed simultaneously using different approaches. GIL (Global Interpreter Lock) limits thread execution, making multithreading less efficient for computational tasks, but suitable for I/O. Multiprocessing, using the multiprocessing module, allows multiple cores to be utilized, providing true parallelism. Asynchrony via asyncio is optimal for I/O operations, allowing thousands of connections to be processed simultaneously without blocking. The choice of approach depends on the nature of the task. + +Learn more about concurrency using the following resources: + +- [@official@Python Concurrency](https://realpython.com/python-concurrency/) \ No newline at end of file diff --git a/src/data/roadmaps/python/content/gil@bS7WeVKm2kEElu3sBKcIC.md b/src/data/roadmaps/python/content/gil@bS7WeVKm2kEElu3sBKcIC.md index 0e2db9d17..46976ea6f 100644 --- a/src/data/roadmaps/python/content/gil@bS7WeVKm2kEElu3sBKcIC.md +++ b/src/data/roadmaps/python/content/gil@bS7WeVKm2kEElu3sBKcIC.md @@ -1 +1,7 @@ -# GIL \ No newline at end of file +# GIL + +GIL is a mechanism that allows only one thread to execute Python code at a time. This limitation is related to memory management in CPython and can reduce the efficiency of multithreaded applications on multi-core systems. + +Learn more about it using the following resources: + +- [@article@What is GIL?](https://realpython.com/python-gil/) \ No newline at end of file diff --git a/src/data/roadmaps/python/content/multiprocessing@HSY5OUc_M5S6OcFXPRtkx.md b/src/data/roadmaps/python/content/multiprocessing@HSY5OUc_M5S6OcFXPRtkx.md index 9ca12a3b8..757df054d 100644 --- a/src/data/roadmaps/python/content/multiprocessing@HSY5OUc_M5S6OcFXPRtkx.md +++ b/src/data/roadmaps/python/content/multiprocessing@HSY5OUc_M5S6OcFXPRtkx.md @@ -1 +1,9 @@ -# Multiprocessing \ No newline at end of file +# Multiprocessing + +Multiprocessing utilizes multiple processes, each with its own GIL. This allows full utilization of multiple processor cores, which is effective for computationally intensive tasks. Python's multiprocessing module supports creating processes and exchanging data between them. + +Learn more about multiprocessing with the following resources: + +- [@official@Official Documentation](https://docs.python.org/3/library/multiprocessing.html) +- [@article@Multiprocessing in Python with Example](https://www.digitalocean.com/community/tutorials/python-multiprocessing-example) +- [@article@Multiprocessing in Python](https://realpython.com/python-multiprocessing/) \ No newline at end of file diff --git a/src/data/roadmaps/python/content/threading@UIx0XYaOgXXlYbbQtjiPq.md b/src/data/roadmaps/python/content/threading@UIx0XYaOgXXlYbbQtjiPq.md index f20d58d18..84d0eef18 100644 --- a/src/data/roadmaps/python/content/threading@UIx0XYaOgXXlYbbQtjiPq.md +++ b/src/data/roadmaps/python/content/threading@UIx0XYaOgXXlYbbQtjiPq.md @@ -1 +1,8 @@ -# Threading \ No newline at end of file +# Threading + +Multithreading allows multiple threads within a single process. However, because of GIL, threads cannot run in parallel on different cores, which makes multithreading suitable for I/O tasks (e.g., network requests) but not for computational tasks. + +Learn more about it from the following resources: + +- [@official@Python Threading Library](https://docs.python.org/3/library/threading.html) +- [@article@Introduction to Threading in Python](https://realpython.com/intro-to-python-threading/) \ No newline at end of file