[ENH] RecursiveMutex (disregard RecursionLock)
Stephan Rudlof
sr at evolgo.de
Sat Sep 21 01:31:05 UTC 2002
Lex Spoon wrote:
> Stephan Rudlof <sr at evolgo.de> wrote:
>
>>Lex Spoon wrote:
>><...>
>>
>>>Also, it's worth asking whether the existing classes have all the
>>>methods that would be expected. Sometimes I've wanted to completely
>>>drain a semaphore, for example, and have had to resort to a loop.
>>
>>What about Semaphore>>initSignals?
>
>
> Hmm,
>
> "Consume any excess signals the receiver may have accumulated."
>
> That does sound like the thing. :)
Nice!
> I'm not convinced it is
> thread-safe, but what the heck.
You could shelter it by another Sema ;-)
> Maybe it's as thread-safe as the
> operation inherently is, anyway.
Too short to understand your possible problems.
> I missed it because of the name; it
> sounds like an initialization method, not something that would be used
> from outside.
No wonder: it's in the 'initialize-release' protocol.
But in spite of this: if it wouldn't be there already, it would have been a
nice addition...
Greetings,
Stephan
>
>
>
> Lex
>
>
--
Stephan Rudlof (sr at evolgo.de)
"Genius doesn't work on an assembly line basis.
You can't simply say, 'Today I will be brilliant.'"
-- Kirk, "The Ultimate Computer", stardate 4731.3
More information about the Squeak-dev
mailing list
|