Hi Juan, Hi All,
On Mon, Mar 6, 2017 at 6:06 AM, Juan Vuletich <[hidden email]> wrote:
Yes, but primitive 136 *should not be used* :-). You should use primitive 242: primSignal: aSemaphore atUTCMicroseconds: anInteger "Signal the semaphore when the UTC microsecond clock reaches the value of the second argument. Fail if the first argument is neither a Semaphore nor nil, or if the second argument is not an integer. Essential. See Object documentation whatIsAPrimitive." <primitive: 242> ^self primitiveFailed The use of the UTC microsecond count eliminates any and all wrapping issues for about 50,000 years [puhleaze Mr Pruitt can you try and do your bit to make it possible that we'll make it that far. hic. ed.]. The old primitive 136 primSignal:atMilliseconds: is subject to wrapping problems. I see that primSignal:atMilliseconds: is still used in Squeak 5.x but only to turn off signaling: Delay class>>shutDown "Suspend the active delay, if any, before snapshotting. It will be reactived when the snapshot is resumed." "Details: This prevents a timer interrupt from waking up the active delay in the midst snapshoting, since the active delay will be restarted when resuming the snapshot and we don't want to process the delay twice." AccessProtect wait. self primSignal: nil atMilliseconds: 0. self saveResumptionTimes. DelaySuspended := true. Delay class>>stopTimerInterruptWatcher "Reset the class variables that keep track of active Delays and re-start the timer interrupt watcher process. Any currently scheduled delays are forgotten." "Delay startTimerInterruptWatcher" self primSignal: nil atMilliseconds: 0. TimingSemaphore ifNotNil:[TimingSemaphore terminateProcess]. I will change this now. HTH
_,,,^..^,,,_ best, Eliot |
Free forum by Nabble | Edit this page |