I am trying to understand multi-threading in python3. Does python3 support multithreading? Yes/No. Core Python packages/library used for multi-threading not the 3rd party, and difference between multithreading and multiprocessing.
            Asked
            
        
        
            Active
            
        
            Viewed 136 times
        
    -4
            
            
        - 
                    Multiprocessing? https://docs.python.org/3/library/multiprocessing.html – Federico Baù Dec 20 '20 at 18:04
- 
                    @FedericoBaù: That's not multi-*threading*, though it's often useful as a replacement for it. – ShadowRanger Dec 20 '20 at 18:05
- 
                    " though it's often useful as a replacement for it." That's excatly why I added it. – Federico Baù Dec 20 '20 at 18:11
- 
                    @Samwise thanks for your time, i google but ... https://www.quora.com/Why-does-Python-not-support-multithreading – Zahoor Saleem Dec 20 '20 at 18:43
1 Answers
1
            
            
        Obviously yes. That's what the threading and concurrent.futures built-in modules are for (the latter also supports multi-process processing, as does multiprocessing). That said, CPython still has a GIL, so without third-party packages involved (or use of multi-process techniques), you'll only see benefits from threading on I/O bound tasks; CPU bound threads will only run one at a time.
 
    
    
        ShadowRanger
        
- 143,180
- 12
- 188
- 271
