Python Tutorial – 30. Multiprocessing Lock



This tutorial walks through why locks are needed in multiprocessing environment. It also demonstrates use of Python multiprocessing module’s lock.
Code used in this tutorial:
Website:
Facebook:
Twitter:
Google +: Patreon:

, , , ,

14 thoughts on “Python Tutorial – 30. Multiprocessing Lock

  1. Hi !.Thanks for explaining what is lock .Could you please explain the impact of lock.acquire() and lock.release() relating this code flow.I could not understand how the code flow goes after we add lock.acquire() and lock.release()

  2. Hi, thanks for sharing this. You are calling two different methods with same argument here but I would like to know whether lock will also work when we are calling the same method with different arguments using multiprocessing.

  3. I've still confused with why you are getting inconsisent values.
    I thought that having `join` in your code, means that you wait for the processes to finish execution; if that's the case than shouldn't you have $200 after both loops finish their loop? Thank you.

  4. I like the way you have explained the concepts . I have watched all the tutorial(6 videos). it a very good learning experience. I appreciate you work .. It made me learn the concept clearly.

    Thanks and hope you will be doing good tutorials in future.

Leave a Reply

Your email address will not be published. Required fields are marked *