Shop OBEX P1 Docs P2 Docs Learn Events
Trying to understand locks — Parallax Forums

Trying to understand locks

mwalimumwalimu Posts: 44
edited 2009-12-28 22:31 in Propeller 1
I've been trying to get a a grasp on the concepts of LOCKS. The documentation is either deceptively simple or it's vague, I can't decide. I just need a someone who gets them to double check my understanding.

a) LOCKs don't actually prevent a resource from being used. They are just flags that a cog can set.
b) The actual area that actual resource that a lock protects is arbitrary, that is it is up to the programmer to decide.

So my understanding is that a lock is something like a bathroom door that can't be latched. The agreement is that if the door is closed it's in use. That doesn't stop someone from barging in, it's just a prearranged signal.

Is that about right?

Comments

Sign In or Register to comment.