Question 3 (Expert):
In Python's asyncio, what is the purpose of the
A) To collect garbage from memory
B) To run multiple awaitables concurrently and wait for all to finish
C) To gather system resources for a task
D) To aggregate results from multiple threads
#Python #AsyncIO #Concurrency #AdvancedProgramming
In Python's asyncio, what is the purpose of the
gather()
function?A) To collect garbage from memory
B) To run multiple awaitables concurrently and wait for all to finish
C) To gather system resources for a task
D) To aggregate results from multiple threads
#Python #AsyncIO #Concurrency #AdvancedProgramming
🫡1
Question 2 (Expert):
In Python's GIL (Global Interpreter Lock), what is the primary reason it allows only one thread to execute Python bytecode at a time, even on multi-core systems?
A) To prevent race conditions in memory management
B) To simplify the CPython implementation
C) To reduce power consumption
D) To improve single-thread performance
#Python #GIL #Concurrency #CPython
✅ By: https://yangx.top/DataScienceQ
In Python's GIL (Global Interpreter Lock), what is the primary reason it allows only one thread to execute Python bytecode at a time, even on multi-core systems?
A) To prevent race conditions in memory management
B) To simplify the CPython implementation
C) To reduce power consumption
D) To improve single-thread performance
#Python #GIL #Concurrency #CPython
✅ By: https://yangx.top/DataScienceQ