<div dir="ltr">Hi Marcel,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 18, 2016 at 1:30 PM, marcel.taeumel <span dir="ltr">&lt;<a href="mailto:Marcel.Taeumel@hpi.de" target="_blank">Marcel.Taeumel@hpi.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi, Eliot.<br>
<br>
Now there are no suspended processes anymore. :-/ I just grabbed a debugger<br>
and took its interruptedProcess. #isSuspended still returned false.<br></blockquote><div><br></div><div>If isSuspended means is waiting on some process list other than the runnable process lists then this is what you&#39;d expect.  For example, the background process is not suspended.  If what yu want to test for is &quot;runnable but not running&quot; then you need something like</div><div><br></div><div><div>isRunnable</div><div><span class="" style="white-space:pre">        </span>&quot;A process is runnable if it is the active process or is on one of the runnable process lists.&quot;</div><div><span class="" style="white-space:pre">        </span>| myPriority |</div><div><span class="" style="white-space:pre">        </span>&quot;Grab my priority now.  Even though evaluation is strictly right-to-left, accessing Processor could involve a send.&quot;</div><div><span class="" style="white-space:pre">        </span>myPriority := priority.</div><div><span class="" style="white-space:pre">        </span>^myList</div><div><span class="" style="white-space:pre">                </span>ifNil: [^self == Processor activeProcess]</div><div><span class="" style="white-space:pre">                </span>ifNotNil: [:list| list == (Processor waitingProcessesAt: myPriority)]</div></div><div><br></div><div>In my image I have all of isRunnable, isSuspended and neither (terminated) processes</div><div><div><br></div><div>| procs |</div><div>procs := Process allInstances.</div><div>procs size -&gt; (procs select: [:p| p isRunnable]) size -&gt; (procs select: [:p| p isSuspended]) size -&gt; (procs reject: [:p| p isRunnable or: [p isSuspended]]) size 19-&gt;4-&gt;6-&gt;9</div></div><div><br></div><div><br></div><div>So I think your issue is that you a) have no isSusoended processes; create some by e.g. opening lots of browsers so that there are background shout processes waiting on semaphores, b) collect some processes that compute something that doesn&#39;t take too long, so you&#39;ve got terminated processes, and then try again.</div><div><br></div><div>So let&#39;s have a look at those processes above</div><div><br></div><div><div><br></div><div>| procs full types |</div><div>procs := Process allInstances.</div><div>types:= {procs select: [:p| p isRunnable]. procs select: [:p| p isSuspended]. procs reject: [:p| p isRunnable or: [p isSuspended]]}.</div><div>full := types collect: [:type| type collect: [:ea| ea -&gt; (ea suspendedContext ifNil: [&#39;Active or terminated&#39;] ifNotNil: [:c| c stackOfSize: 5])]].</div><div>full </div><div><br></div><div>&quot;isRunnable&quot;</div><div>{{  a Process in ProcessorScheduler class&gt;&gt;idleProcess-&gt;an OrderedCollection(ProcessorScheduler class&gt;&gt;idleProcess [] in ProcessorScheduler class&gt;&gt;startUp: [] in BlockClosure&gt;&gt;newProcess) .</div><div>    a Process in nil-&gt;&#39;Active or terminated&#39;} .</div><div><br></div><div>&quot;isSuspended&quot;</div><div>{a Process in Delay class&gt;&gt;handleTimerEvent-&gt;an OrderedCollection(Delay class&gt;&gt;handleTimerEvent Delay class&gt;&gt;runTimerEventLoop [] in Delay class&gt;&gt;startTimerEventLoop [] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in [] in SHTextStylerST80(SHTextStyler)&gt;&gt;styleInBackgroundProcess:-&gt;an OrderedCollection([] in [] in SHTextStylerST80(SHTextStyler)&gt;&gt;styleInBackgroundProcess: [] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in EventSensor&gt;&gt;userInterruptWatcher-&gt;an OrderedCollection(EventSensor&gt;&gt;userInterruptWatcher [] in EventSensor&gt;&gt;installInterruptWatcher [] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in Delay&gt;&gt;wait-&gt;an OrderedCollection([] in Delay&gt;&gt;wait BlockClosure&gt;&gt;ifCurtailed: Delay&gt;&gt;wait [] in EventSensor&gt;&gt;eventTickler BlockClosure&gt;&gt;on:do:) .</div><div>a Process in WeakArray class&gt;&gt;finalizationProcess-&gt;an OrderedCollection(WeakArray class&gt;&gt;finalizationProcess [] in WeakArray class&gt;&gt;restartFinalizationProcess [] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in SmalltalkImage&gt;&gt;lowSpaceWatcher-&gt;an OrderedCollection(SmalltalkImage&gt;&gt;lowSpaceWatcher [] in SmalltalkImage&gt;&gt;installLowSpaceWatcher [] in BlockClosure&gt;&gt;newProcess) .</div><div>&quot;this one is the styler for the pane in which I ran the doit:&quot;</div><div>a Process in [] in [] in SHTextStylerST80(SHTextStyler)&gt;&gt;styleInBackgroundProcess:-&gt;an OrderedCollection([] in [] in SHTextStylerST80(SHTextStyler)&gt;&gt;styleInBackgroundProcess: [] in BlockClosure&gt;&gt;newProcess)} .</div><div><br></div><div>&quot;neither isRunnable notr isSuspended&quot;</div><div>{a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in nil-&gt;&#39;Active or terminated&#39; .</div><div>a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess) .</div><div>a Process in [] in BlockClosure&gt;&gt;newProcess-&gt;an OrderedCollection([] in BlockClosure&gt;&gt;newProcess)}}</div></div><div><br></div><div><br></div><div>Hmmm, interesting.  The isRunnable and isSuspended set are exactly as I would expect.  But what are all these spawning processes?  I&#39;ll use the pointer finder to track them down.</div><div><br></div><div>6 of them are styler processes that have yet to start running, so presumably in browsers I&#39;ve left open but have never looked at.</div><div>One of them was terminated before I could track it down.</div><div>One of them is the modalProcess in an MCMergeBrowser.</div><div>One of them is the uiProcess in a project.</div><div><br></div><div>So as far as I can tell the isSuspended and isRunnable definitions I mention above are fine.  Shall I commit isRunnable?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Best,<br>
Marcel<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://forum.world.st/Process-isSusended-tp4878671p4878690.html" rel="noreferrer" target="_blank">http://forum.world.st/Process-isSusended-tp4878671p4878690.html</a><br>
Sent from the Squeak - Dev mailing list archive at Nabble.com.<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>