Back: DeferredVariableBinding-storing Up: Base classes Forward: Delay class-instance creation   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.61 Delay

Defined in namespace Smalltalk
Superclass: Object
Category: Kernel-Processes
I am the ultimate agent for frustration in the world. I cause things to wait (sometimes much more than is appropriate, but it is those losing operating systems' fault). When a process sends one of my instances a wait message, that process goes to sleep for the interval specified when the instance was created.

1.61.1 Delay class: instance creation  (class)
1.61.2 Delay class: still unclassified  (class)
1.61.3 Delay class: timer process  (class)
1.61.4 Delay: accessing  (instance)
1.61.5 Delay: comparing  (instance)
1.61.6 Delay: copying  (instance)
1.61.7 Delay: delaying  (instance)
1.61.8 Delay: initialization  (instance)
1.61.9 Delay: instance creation  (instance)
1.61.10 Delay: testing  (instance)
1.61.11 Delay: timeout  (instance)


1.61.1 Delay class: instance creation

forMilliseconds: millisecondCount
Answer a Delay waiting for millisecondCount milliseconds

forSeconds: secondCount
Answer a Delay waiting for secondCount seconds

untilMilliseconds: millisecondCount
Answer a Delay waiting for millisecondCount milliseconds after startup


1.61.2 Delay class: still unclassified

update: aspect
Prime the timer event loop when the image starts running.


1.61.3 Delay class: timer process

activeDelay
Return the delay at the head of the queue.

handleDelayRequestor
Handle a timer event; which can be either: - a schedule or unschedule request (DelayRequestor notNil) - a timer signal (not explicitly specified) We check for timer expiry every time we get a signal.

runDelayProcess
Run the timer event loop.

scheduleDelay: aDelay
Private - Schedule this Delay. Run in the timer process, which is the only one that manipulates Queue.

startDelayLoop
Start the timer event loop.

unscheduleDelay: aDelay
Private - Unschedule this Delay. Run in the timer process, which is the only one that manipulates Queue.


1.61.4 Delay: accessing

asAbsolute
Answer a delay that waits until the current delay's resumptionTime, or delayDuration milliseconds from now if that would be nil. May answer the receiver if it is already waiting until an absolute time.

delayDuration
Answer the time I have left to wait, in milliseconds.

isAbsolute
Answer whether the receiver waits until an absolute time on the millisecond clock.

resumptionTime
Answer `resumptionTime'.


1.61.5 Delay: comparing

= aDelay
Answer whether the receiver and aDelay denote the same delay

hash
Answer an hash value for the receiver


1.61.6 Delay: copying

postCopy
Adjust the current delay so that it behaves as if it had just been created.


1.61.7 Delay: delaying

timedWaitOn: aSemaphore
Schedule this Delay and wait on it. The current process will be suspended for the amount of time specified when this Delay was created, or until aSemaphore is signaled.

wait
Schedule this Delay and wait on it. The current process will be suspended for the amount of time specified when this Delay was created.


1.61.8 Delay: initialization

initForMilliseconds: value
Initialize a Delay waiting for millisecondCount milliseconds


1.61.9 Delay: instance creation

initUntilMilliseconds: value
Initialize a Delay waiting for millisecondCount milliseconds after startup


1.61.10 Delay: testing

isActive
Answer whether this Delay is being waited on.


1.61.11 Delay: timeout

value: aBlock onTimeoutDo: aTimeoutBlock
Execute aBlock for up to the time of my own delay; in case the code did not finish abort the execution, unwind the block and then evaluate aTimeoutBlock.



Back: Delay-testing Up: Delay Forward: DelayedAdaptor   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on April, 16 2013 using texi2html