[Vm-dev] Where to get Monitor implementation based on primitives?

Ben Coman btc at openinworld.com
Wed Jan 20 14:33:37 UTC 2016


On Mon, Jan 18, 2016 at 6:22 PM, Denis Kudriashov <dionisiydk at gmail.com> wrote:
>
>
> 2016-01-17 19:10 GMT+01:00 Ben Coman <btc at openinworld.com>:
>>
>> I find LockOwnership a bit cumbersome.  I guess you don't want just
>> Lock but to include the sense of ownership.  Would you consider one of
>> these...
>> * Locker   "A person or thing that does an action indicated by the
>> root verb" [1]
>> * Lockee   "Less commonly added to verbs to form words meaning a
>> person or thing that is the subject of that verb (ie, who or that does
>> an action), especially where a passive sense of the verb is implied."
>> [2]
>> * OwnLock
>> * OwnedLock
>
>
> To choose better class name we should take into account how we will use it.
> Could you suggest names for #acquire and #release in context of your class name?
> ("locker acquire" is not good)

You're right.   I didn't think it through.  I don't have any good
alternative message names.

>
> If people think that simple Lock is good for this purpose we can use it.

I think Lock is probably okay but survey a few more opinions.  However
a generic lock as introduced in most CS lessons that turned up in
searches don't have an owner, so maybe my last suggestion OwnedLock is
also. For example...
   lock := OwnedLock new.
   lock aquire

cheers -ben


More information about the Vm-dev mailing list