On 11/10/2010 10:54 AM, Paolo Bonzini wrote:
> On 11/10/2010 10:49 AM, Holger Hans Peter Freyther wrote:
>> thanks, I will need to read it a couple of more times until I figure out what
>> I need to do.:)
> 
> Nothing? :)

What about the VM change for a cleanup? That is just to wait for multiple
things to happen?


> 
>    (Delay forSeconds: 1) timedWaitOn: sema
> 
> will wait on a semaphore for 1 second, and return true if the timeout
> occurred, false if the semaphore was grabbed.


    nextTimed: timeout [
        "Wait for an object up to timeout seconds"
        <category: 'accessing'>
        | delay expired result |

        delay := Delay forSeconds: timeout.
        expired := delay timedWaitOn: valueReady.

        expired ifTrue: [
            "Raise some kind of exception"
        ]

        queueSem critical: [result := queue removeFirst].
        ^result
    ]


so something like the above for SharedQueue would be acceptable upstream? Or
should I keep it as an extension?

_______________________________________________
help-smalltalk mailing list
help-smalltalk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to