Future.st
changeset 3064 7fe7e32ae4dd
parent 2829 e84f89563562
child 3455 4467a141f5eb
--- a/Future.st	Thu Jul 25 11:42:46 2013 +0200
+++ b/Future.st	Thu Jul 25 11:49:26 2013 +0200
@@ -58,15 +58,21 @@
 
 documentation
 "
-    I represent an execution in progress.
-    I will immediately start execution in a separate process.
-    Any messages sent to me are delayed until execution has completed.'
+    I represent an execution in progress, which will be required some time
+    in the future.
+    I will immediately start execution in a separate process,
+    but delay any messages sent to me, until the execution has completed.
+    This is useful for time consuming operations (print jobs, compile jobs etc.),
+    which can be done in the background and the user can do something else
+    in the meantime. If the computation is finished before the user needs its
+    value, he is not forced to wait.
+    If the computation is unfinished, he has to wait for the remaining time only.
 
     [author:]
-	tph@cs.man.ac.uk
+        tph@cs.man.ac.uk
 
     [see also:]
-	Block Lazy LazyValue
+        Block Lazy LazyValue
 "
 !
 
@@ -79,6 +85,7 @@
 
     fac := [5000 factorial] futureValue.
     Transcript showCR: 'evaluating factorial...'.
+    Dialog information:'You can do something useful now...'.
     Transcript showCR: fac
                                                                     [exEnd]
 
@@ -113,8 +120,8 @@
     to be done, and some other useful work can be done in the meanwhile.
     for example:
 
-    Here, the input is read before - the readTime and view creation
-    times sum up:
+    Without futures, the inputfile is read before opening the view;
+    the readTime and view creation times sum up:
                                                                     [exBegin]
         |p text v|
 
@@ -137,9 +144,10 @@
                                                                     [exEnd]
 
 
-    Here, the view creation and reading are done in parallel:
-    (if the user is slow when opening the view, the contents may
-     be already available)
+    With futures, the view creation and reading are done in parallel:
+    (if the windowing system is slow when opening the view, the contents may
+     be already available - especially on X window systems, where the user
+     has to provide the window position with the mouse)
                                                                     [exBegin]
         |p text v|
 
@@ -351,9 +359,10 @@
 !Future class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Future.st,v 1.17 2012-10-19 11:36:05 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Future.st,v 1.18 2013-07-25 09:49:26 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic2/Future.st,v 1.17 2012-10-19 11:36:05 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Future.st,v 1.18 2013-07-25 09:49:26 cg Exp $'
 ! !
+