Process.st
changeset 13563 a82e5ddf671a
parent 13398 5c6fd278f26b
child 14359 794447210c24
--- a/Process.st	Sun Aug 07 13:37:33 2011 +0200
+++ b/Process.st	Sun Aug 07 15:31:37 2011 +0200
@@ -92,16 +92,16 @@
     (i.e. there is no need to send an explicit terminate).
 
     Notice: 
-	in Smalltalk/X, processes are gone, when an image is restarted;
-	this means, that you have to take care of process re-creation yourself.
-	Usually, this is done by depending on ObjectMemory, recreating the
-	process(es) when the #returnFromSnapshot-change notifiction arrives.
+        in Smalltalk/X, processes are gone, when an image is restarted;
+        this means, that you have to take care of process re-creation yourself.
+        Usually, this is done by depending on ObjectMemory, recreating the
+        process(es) when the #returnFromSnapshot-change notifiction arrives.
 
-	All views (actually windowGroups) recreate their window process
-	on image-restart. You have to do so manually for your own processes.
+        All views (actually windowGroups) recreate their window process
+        on image-restart. You have to do so manually for your own processes.
 
     A later version will allow specification of automatic restart, but
-    thats not yet implemented. However, even when implemented, restartable processes
+    that's not yet implemented. However, even when implemented, restartable processes
     will be recreated to restart from the beginning. It will not be possible to
     automatically continue a processes execution where it left off.
     This is a consequence of the portable implementation of ST/X, since in order to
@@ -112,147 +112,147 @@
     with ST/X's design goal of being highly portable).
 
     Process synchronization:
-	Synchronization with cooperating processes is supported as usual,
-	via Semaphores (see Semaphore, Delay, SharedQueue etc.)
+        Synchronization with cooperating processes is supported as usual,
+        via Semaphores (see Semaphore, Delay, SharedQueue etc.)
 
-	With uncooperative processes, only synchronization on suspend
-	and termination is possible:
-	  any other process can wait for a process to suspend or terminate. 
-	  This waiting is implemented by using suspendSemaphore and exitBlocks
-	  (where an exitSemaphore is signalled).
-	  See waitUntilSuspended / waitUntilTerminated.
+        With uncooperative processes, only synchronization on suspend
+        and termination is possible:
+          any other process can wait for a process to suspend or terminate. 
+          This waiting is implemented by using suspendSemaphore and exitBlocks
+          (where an exitSemaphore is signalled).
+          See waitUntilSuspended / waitUntilTerminated.
 
 
     Process states:
-	#dead           process has (been) terminated;
-			the process instance has no underlting
-			thread.
+        #dead           process has (been) terminated;
+                        the process instance has no underlting
+                        thread.
 
-	#run            the process is willing to run,
-			but not active (i.e. another higher prio
-			process is currently executing)
+        #run            the process is willing to run,
+                        but not active (i.e. another higher prio
+                        process is currently executing)
 
-	#active         the process is the current process
-			(there is only one)
+        #active         the process is the current process
+                        (there is only one)
 
-	#ioWait         waiting on some io-related semaphore
-			(typically in #readWait / #writeWait)
+        #ioWait         waiting on some io-related semaphore
+                        (typically in #readWait / #writeWait)
 
-	#eventWait      waiting on some GUI event
+        #eventWait      waiting on some GUI event
 
-	#timeWait       waiting on a timer-related semaphore
+        #timeWait       waiting on a timer-related semaphore
 
-	#wait           waiting on some (other) semaphore
+        #wait           waiting on some (other) semaphore
 
-	#suspended      stopped from execution; however, an interrupt
-			will return it into the run state.
+        #suspended      stopped from execution; however, an interrupt
+                        will return it into the run state.
 
-	#stopped        stopped from execution; an interrupt will
-			NOT return it into the run state (for debugging)
+        #stopped        stopped from execution; an interrupt will
+                        NOT return it into the run state (for debugging)
 
-	#debug          debugger sitting on top of the processes
-			stack.
+        #debug          debugger sitting on top of the processes
+                        stack.
 
     Win32 only:
 
-	#osWait         waiting on an OS-API call to finish.
-			can be interrupted, terminated and aborted
-			(i.e. the usual context actions are is possible).
+        #osWait         waiting on an OS-API call to finish.
+                        can be interrupted, terminated and aborted
+                        (i.e. the usual context actions are is possible).
 
-	#halted         thread was cought while in a blocking API call
-			or primitive endless loop and has been halted by
-			the scheduler.
-			Can only be resumed or hard-terminated - abort
-			or soft terminate or unwind actions are not possible.
-			(due to win32 limitations)
+        #halted         thread was cought while in a blocking API call
+                        or primitive endless loop and has been halted by
+                        the scheduler.
+                        Can only be resumed or hard-terminated - abort
+                        or soft terminate or unwind actions are not possible.
+                        (due to win32 limitations)
 
 
     [Instance variables:]
 
-	id                     <SmallInteger>   a unique process-id
+        id                     <SmallInteger>   a unique process-id
 
-	creatorId              <SmallInteger>   the id of the process that
-						created me (useful for debugging
-						or monitoring).
+        creatorId              <SmallInteger>   the id of the process that
+                                                created me (useful for debugging
+                                                or monitoring).
 
-	processGroupId                          usually the id of the creator,
-						unless the process detached from
-						the group and became a groupLeader.
-						Groups can be easily terminated
-						as a whole.
-						Group leaders have a groupId of nil.
-						A groupId of 0 (zero) marks a system
-						process; these do not prevent a standAlone
-						app from exiting.
+        processGroupId                          usually the id of the creator,
+                                                unless the process detached from
+                                                the group and became a groupLeader.
+                                                Groups can be easily terminated
+                                                as a whole.
+                                                Group leaders have a groupId of nil.
+                                                A groupId of 0 (zero) marks a system
+                                                process; these do not prevent a standAlone
+                                                app from exiting.
 
-	prio                   <SmallInteger>   the processes priority
+        prio                   <SmallInteger>   the processes priority
 
-	priorityRange          <Interval>       the processes dynamic priority range
-						(or nil)
+        priorityRange          <Interval>       the processes dynamic priority range
+                                                (or nil)
 
-	state                  <Symbol>         the processes state
-						(for process-monitor)
+        state                  <Symbol>         the processes state
+                                                (for process-monitor)
 
-	startBlock             <Block>          the startup-block (the one that forked)
+        startBlock             <Block>          the startup-block (the one that forked)
 
-	name                   <String-or-nil>  the processes name (if any)
-						(for process-monitor)
+        name                   <String-or-nil>  the processes name (if any)
+                                                (for process-monitor)
 
-	suspendSemaphore       <Semaphore>      triggered when suspend (if nonNil)
+        suspendSemaphore       <Semaphore>      triggered when suspend (if nonNil)
 
-	restartable            <Boolean>        is restartable; if true, the process
-						will be restarted when an image is
-						restarted. Otherwise, it remains dead.
-						Running processes cannot be continued
-						at the point where leftOff after an 
-						image-restart.
+        restartable            <Boolean>        is restartable; if true, the process
+                                                will be restarted when an image is
+                                                restarted. Otherwise, it remains dead.
+                                                Running processes cannot be continued
+                                                at the point where leftOff after an 
+                                                image-restart.
 
-	interruptActions       <Collection>     interrupt actions as defined by interruptWith:,
-						performed at interrupt time
+        interruptActions       <Collection>     interrupt actions as defined by interruptWith:,
+                                                performed at interrupt time
 
-	exitActions            <Collection of Block>          
-						additional cleanup actions to perform 
-						on termination (if nonEmpty)
+        exitActions            <Collection of Block>          
+                                                additional cleanup actions to perform 
+                                                on termination (if nonEmpty)
                                                 
-	emergencySignalHandler <Block>          can be used for per-process
-						emergency signal handling
+        emergencySignalHandler <Block>          can be used for per-process
+                                                emergency signal handling
 
-	interruptsDisabled     <Boolean>        flag if interrupts (as installed
-						via #interruptWith:) are currently
-						disabled. (i.e. on-hold).
-						Interrupts will be delivered when
-						reenabled.
+        interruptsDisabled     <Boolean>        flag if interrupts (as installed
+                                                via #interruptWith:) are currently
+                                                disabled. (i.e. on-hold).
+                                                Interrupts will be delivered when
+                                                reenabled.
 
-	exceptionHandlerSet    <ExceptionhandlerSet>
-						Handled by any process; allows for
-						exceptionHandlers and query-answerers to
-						be added/removed dynamically.
+        exceptionHandlerSet    <ExceptionhandlerSet>
+                                                Handled by any process; allows for
+                                                exceptionHandlers and query-answerers to
+                                                be added/removed dynamically.
 
     [Class variables:]
 
-	TerminateSignal         <Signal>        signal used to terminate processes
-						(should not be caught - or at least
-						 rejected in handlers).
-						If caught and proceeded, a process
-						cannot be terminated via #terminate.
-						For hardTermination (in case of emergency),
-						send it a #erminateNoSignal message.
+        TerminateSignal         <Signal>        signal used to terminate processes
+                                                (should not be caught - or at least
+                                                 rejected in handlers).
+                                                If caught and proceeded, a process
+                                                cannot be terminated via #terminate.
+                                                For hardTermination (in case of emergency),
+                                                send it a #erminateNoSignal message.
 
-	RestartSignal           <Signal>        signal used to restart a process.
-						Can be caught in additional handler(s),
-						to perform all kind of re-initialization.
-						However, these handlers should reject,
-						for the restart to be really performed.
+        RestartSignal           <Signal>        signal used to restart a process.
+                                                Can be caught in additional handler(s),
+                                                to perform all kind of re-initialization.
+                                                However, these handlers should reject,
+                                                for the restart to be really performed.
 
     [see also:]
-	ProcessorScheduler
-	Block
-	Sempahore SemaphoreSet Delay SharedQueue
-	WindowGroup
-	(``Working with processes'': programming/processes.html)
+        ProcessorScheduler
+        Block
+        Sempahore SemaphoreSet Delay SharedQueue
+        WindowGroup
+        (``Working with processes'': programming/processes.html)
 
     [author:]
-	Claus Gittinger
+        Claus Gittinger
 
 "
 !
@@ -2055,11 +2055,11 @@
 
 version_CVS
 
-    ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.173 2011-06-28 10:33:35 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Process.st,v 1.174 2011-08-07 13:31:37 cg Exp $'
 !
 
 version_SVN
-    ^ ' Id: Process.st 10643 2011-06-08 21:53:07Z vranyj1  '
+    ^ '§ Id: Process.st 10643 2011-06-08 21:53:07Z vranyj1  §'
 ! !
 
 Process initialize!