All the resources for multi-threading python programming.
import threading
Thats all is there in python multi processing! Of course you should know what to use where? I found this great slideshare option that you should go through to get up and running in python multi processing. An Introduction to Python Concurrency.
Semaphore is the oldest parallel processing concepts. Which of course highly useful for any multi processing programs. For me it was a SPI Bus accessed using a raspberry pi. There are 4 chip selects and each communication event is a new thread. To provide access to a single bus, semaphore was used. Its implementation is straight forward in python.
parallelProc = threading.Semaphore(1) #parallelProc is the object that holds the semaphore and allows only one concurrent process.
now, it might get painful to get the acquire and release right, but otherwise it is great!
def communicationEvent():
parallelProc.acquire()
print 'Doing bus transactions here!'
parallelProc.release()
Finding time for adding more of the concepts in the future
One might think life just got easier with multi-threading, but thats when shit gets real! (Ned Stark way of telling)
Check out the differences between Parallel vs. Concurrent 😉
I will let David know. I would assume that at this time, python didn’t have a concurrency model at all in its programming paradigm.
https://www.dabeaz.com/