Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Lock Objects

Give Feedback

In this lesson, you’ll learn about lock objects and how you can use a lock as a context manager to prevent more than one thread from accessing a part of your program at the same time. If you download the sample code, you can get your own copy of 10-lock.py:

Download

Sample Code (.zip)

12.9 KB

To learn more, you can also check out the documentation.

Comments & Discussion

Become a Member to join the conversation.