Python Forum

Full Version: Tutorials on sockets, threading and multi-threading?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings,

Does anyone know of any books or online tutorials that talks in depth about the networking aspects of Python: sockets, threading, multi-threading, etc? I am assuming multi-threading tasks is the same as asynchronous/parallel tasks? I have been studying Python for about 4 months and have a solid base foundation of the language but these topics are quite new to me.

Also, based on the following terms, can someone tell me if the words are used interchangeably? Just line them up next to one another.

Sockets
Threading
Multi-Threading
Multi-Processing
Parallel
Asynchronous

Thanks,
Matt
Multi-Threading and Multi-Processing are different. For most operating systems each process executes in their own address space and are unable to do anything to each other unless each one does something special to allow Inter-Process Communication (IPC). There can be many threads (also called tasks) for each process and they can share resources directly within their process but only their process, except there needs to be synchronization among threads/tasks.

The term asynchronous depends on context. It implies Multi-Threading but something called asynchronous might create a separate thread but might not and be asynchronous only when something else creates the thread.

The question is asking so many things that it might be better to ask about networking separate form Multi-Threading.
I get what you're saying. Asynchronous can be achieved by both if that is your intention.

I am reading up on this topic.

Thank you.


(Oct-01-2021, 08:17 PM)SamHobbs Wrote: [ -> ]Multi-Threading and Multi-Processing are different. For most operating systems each process executes in their own address space and are unable to do anything to each other unless each one does something special to allow Inter-Process Communication (IPC). There can be many threads (also called tasks) for each process and they can share resources directly within their process but only their process, except there needs to be synchronization among threads/tasks.

The term asynchronous depends on context. It implies Multi-Threading but something called asynchronous might create a separate thread but might not and be asynchronous only when something else creates the thread.

The question is asking so many things that it might be better to ask about networking separate form Multi-Threading.