Python Forum
Tutorials on sockets, threading and multi-threading? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Tutorials on sockets, threading and multi-threading? (/thread-35130.html)



Tutorials on sockets, threading and multi-threading? - muzikman - Oct-01-2021

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


RE: Tutorials on sockets, threading and multi-threading? - SamHobbs - Oct-01-2021

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.


RE: Tutorials on sockets, threading and multi-threading? - muzikman - Oct-01-2021

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.