|
Re: Block other processes?: msg#00151lang.smalltalk.squeak.beginners
On 8/18/07, John Almberg <jalmberg@xxxxxxxxxxx> wrote: > I guess another way to ask this question is: is it possible for > Squeak to steal cycles from an Object's 'step' process, while the > step is running, or does the Object have control until the step > completes? This is not the way that Squeak works. Objects do not have a step process. Squeak objects don't know much about processes or execution. Squeak has processes, semaphores, etc. and they are objects, but most objects don't have anything to do with them. Every process has a priority. Squeak runs a process until the process stops or a higher-priority process is ready to run. You can make Squeak implement a round-robin scheduler by having a higher-priority process wait on a timer and, when it wakes up, stop the process that it just implemented and let the next process run. This is probably not a good idea because most code in Squeak is not threadsafe and does not expect to be interrupted. But it can be done. Look at class Process and Semaphore. All the code that does this is open and easily changed. Not necessarily easy to change without breaking something, however! -Ralph Johnson
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Block other processes?, John Almberg |
|---|---|
| Next by Date: | Re: XML Post, Giovanni Corriga |
| Previous by Thread: | Re: Block other processes?, John Almberg |
| Next by Thread: | Re: Block other processes?, John Almberg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |