Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - martingever

#1
Blogs of Interest and Note / Re: python thread management
September 18, 2018, 12:57:31 AM
The Python threading module uses threads instead of processes. Threads run in the same unique memory heap. Whereas Processes run in separate memory heaps. This, makes sharing information harder with processes and object instances. One problem arises because threads use the same memory heap, multiple threads can write to the same location in the memory heap which is why the global interpreter lock(GIL) in CPython was created as a mutex to prevent it from happening.

The multithreading library is lightweight, shares memory, responsible for responsive UI and is used well for I/O bound applications. Check this simple example of...multithreaded socket programming