in ,

Locks, Mutexes, and Semaphores: Types of Synchronization Objects, Hacker News


I recently got an email asking about locks and different types of synchronization objects, so I’m posting this entry in case it is of use to others.

Locks

Alockis an abstract concept. The basic premise is that a lock protects access to some kind of shared resource. If youowna lock then you can access the protected shared resource. If you do notownthe lock then you cannot access the shared resource.

To own a lock, you first need some kind oflockableobject. You then acquire the lock from that object. The precise terminology may vary. For example, if you have a lockable object XYZ you may:

What do you think?

Leave a Reply

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

GIPHY App Key not set. Please check settings

Building a BitTorrent client from the ground up in Go, Hacker News

[FREE]Front End Web Development For Beginners (A Practical Guide)