<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 16, 2017 at 10:06 AM, tim Rowledge <span dir="ltr"><<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>></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"><span class="gmail-"><br>
> On 16-02-2017, at 3:54 AM, Göran Krampe <<a href="mailto:goran@krampe.se">goran@krampe.se</a>> wrote:<br>
><br>
> On 15/02/17 22:34, tim Rowledge wrote:<br>
>> Hi Göran!<br>
>><br>
>>> On 15-02-2017, at 3:50 AM, Göran Krampe <<a href="mailto:goran@krampe.se">goran@krampe.se</a>> wrote:<br>
>>><br>
>><br>
>>> I wrote the current incarnation of SocketStream and I intentionally<br>
>>> did not add any semaphore/mutex for protections. And yes, the<br>
>>> SocketStream has internal state to know positions in buffers etc<br>
>>> etc - so NO, you should not use two Processes with the same<br>
>>> SocketStream.<br>
>>><br>
>>> Having said that...  if you have one process only writing and one<br>
>>> only reading - you may get away with it - IIRC (no promises) the<br>
>>> inBuffer and outBuffer (and associated ivars) may be 100%<br>
>>> separated.<br>
>><br>
>> A single process to write and another to read, both at same priority<br>
>> so only one can be  doing stuff at once.<br>
><br>
> Mmmm, those two will not preempt each other - but other processes with higher prio preempt them (right?), so perhaps I am daft but doesn't that mean they will switch anyway (potentially in the middle of a method etc)?<br>
<br>
</span>If I’ve remembered right, the scheduling sticks a suspended process at at the *front* of the queue these days, not the back as was the case when us dinosaurs first roamed the Earth. The idea being to make sure that a process interrupted by a quick timer job gets back to its work sooner rather than later.<br></blockquote><div><br></div><div>That is indeed the case.  See </div><div><br></div><div>    SmalltalkImage current processPreemptionYields = false </div><div><br></div><div>and ProcessorScheduler class>>#startUp:</div><div> </div><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>