On Wed, 8 Dec 2010, Eliot Miranda wrote:
> On Wed, Dec 8, 2010 at 6:22 PM, <
[hidden email]> wrote:
>
>> A new version of Kernel was added to project The Inbox:
>>
http://source.squeak.org/inbox/Kernel-ul.523.mcz>>
>> ==================== Summary ====================
>>
>> Name: Kernel-ul.523
>> Author: ul
>> Time: 8 December 2010, 4:45:41.467 am
>> UUID: 809ca265-c5de-ac47-b6d6-226f80cf9245
>> Ancestors: Kernel-ul.522
>>
>> - added Semaphore >> #waitIfLocked:
>>
>> =============== Diff against Kernel-ul.522 ===============
>>
>> Item was added:
>> + ----- Method: Semaphore>>waitIfLocked: (in category 'communication')
>> -----
>> + waitIfLocked: aBlock
>> + "Use a signal if available, otherwise evaluate aBlock"
>> +
>> + excessSignals == 0 ifTrue: [ ^aBlock value ].
>> + excessSignals := excessSignals - 1!
>>
>
> Not
>
> waitIfLocked: aBlock
> "Use a signal if available, otherwise evaluate aBlock"
>
> excessSignals == 0 ifTrue: [ ^aBlock valueNoContextSwitch ].
> excessSignals := excessSignals - 1
>
> ?
It could be, though I don't see a case where it makes a difference. This
method is used in Collections-ul.412, which is available in the Inbox.
Levente
>