[squeak-dev] The Trunk: Kernel-laza.241.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: Kernel-laza.241.mcz

commits-2
Alexander Lazarević uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-laza.241.mcz

==================== Summary ====================

Name: Kernel-laza.241
Author: laza
Time: 5 September 2009, 8:51:42 am
UUID: bb272481-19dd-ca4d-9f2d-283443900cf5
Ancestors: Kernel-ar.240

Removes the warning of too long delays from the Delay class comment

=============== Diff against Kernel-ar.240 ===============

Item was changed:
  Object subclass: #Delay
  instanceVariableNames: 'delayDuration resumptionTime delaySemaphore beingWaitedOn'
  classVariableNames: 'AccessProtect ActiveDelay ActiveDelayStartTime DelaySuspended FinishedDelay RunTimerEventLoop ScheduledDelay SuspendedDelays TimerEventLoop TimingSemaphore'
  poolDictionaries: ''
  category: 'Kernel-Processes'!
 
+ !Delay commentStamp: 'laza 9/5/2009 08:45' prior: 0!
- !Delay commentStamp: 'stephaneducasse 10/1/2005 21:07' prior: 0!
  I am the main way that a process may pause for some amount of time.  The simplest usage is like this:
 
  (Delay forSeconds: 5) wait.
 
  An instance of Delay responds to the message 'wait' by suspending the caller's process for a certain amount of time. The duration of the pause is specified when the Delay is created with the message forMilliseconds: or forSeconds:. A Delay can be used again when the current wait has finished. For example, a clock process might repeatedly wait on a one-second Delay.
 
+ A delay in progress when an image snapshot is saved is resumed when the snapshot is re-started. Delays work across millisecond clock roll-overs.
- The maximum delay is (SmallInteger maxVal // 2) milliseconds, or about six days. A delay in progress when an image snapshot is saved is resumed when the snapshot is re-started. Delays work across millisecond clock roll-overs.
 
 
  For a more complex example, see  #testDelayOf:for:rect: .
 
  A word of advice:
  This is THE highest priority code which is run in Squeak, in other words it is time-critical. The speed of this code is critical for accurate responses, it is critical for network services, it affects every last part of the system.
 
  In short: Don't fix it if it ain't broken!! This code isn't supposed to be beautiful, it's supposed to be fast!! The reason for duplicating code is to make it fast. The reason for not using ifNil:[]ifNotNil:[] is that the compiler may not inline those. Since the effect of changes are VERY hard to predict it is best to leave things as they are for now unless there is an actual need to change anything!