From: John M McIntosh johnmci@smalltalkconsulting.com Reply-To: johnmci@smalltalkconsulting.com,The general-purpose Squeak developers listsqueak-dev@lists.squeakfoundation.org To: The general-purpose Squeak developers listsqueak-dev@lists.squeakfoundation.org Subject: Re: Alternative Thread Schedulers Date: Wed, 30 May 2007 10:02:27 -0700
On May 29, 2007, at 11:08 PM, J J wrote:
What's important is what is the next runnable process. That can be adjusted in the ProcessScheduler Smalltalk class by suspending processes you don't want to run yet, or adjusting priorities to sort the processes into something different.
That is a great idea! I can just suspend every process except the one I want to be current, and the scheduler (I will probably have to have my own lists for the processes anyway). Now if my scheduler process calls #waitMilliseconds: 250 and the VM decides the current process needs to sleep, will he wake up my processor object even though the 250 milliseconds are not over, or he would go to the idle process at that point?
I guess it doesn't matter, I would just have to have a timer interupt class that did the #waitMilliseconds and the actual Scheduler class at a low priority to take control when the VM wants to switch to a new process. Everything else (except real-time processes) would be suspended until I explicitly resume them.
_________________________________________________________________ More photos, more messages, more storageget 2GB with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migr...