<br><br><div><span class="gmail_quote">On 10/17/07, <b class="gmail_sendername">gruntfuttuck</b> &lt;<a href="mailto:gruntfuttuck@gmail.com">gruntfuttuck@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>How is squeak going to handle multy-core CPUs, if at all? If we see cores of<br>100 plus in the future and squeak stay as it is, I would imagine other<br>languages such as erlang, will look more attractive.<br></blockquote>
</div><br>The answer seems pretty obvious: modify the VM to support them. I&#39;ll skim over the details which I&#39;m sure everybody already knows.<br><br>My question is: what are we going to do with multi-core CPUs? The code in the image is almost all single threaded. Morphic freezes up when I run something in the workspace (!!). Smalltalkers just don&#39;t seem to understand multi-threaded code, even though the basic capabilities been available to them since day one.
<br><br>I use Futures now and then; I implemented them myself:<br><br>f := Future doing: [ some long computation ].<br>... insert more code here which runs in parallel with the long computation.<br>f printResult. &quot;Will block until the long computation has returned the result into f and then print the result. &quot;
<br clear="all"><br>I imagine that a parallel collection package would be possible to make:<br><br>c := ParOrderedCollection new. &quot;or ParSet, ParBag...&quot;<br>c addAll: lots of stuff.<br>c do: [ :each | each doSomething ]. &quot;Will fork a Process for each element in c. &quot;
<br>c map: [ :each | each transform] andGather: [ :each :sum | sum combineWith: each]. &quot;Google&#39;s map and gather algorithm&quot;<br><br>Object&gt;&gt;changed: can be modified to be parallel; this makes the dependents/updating framework parallel. I did this and the image seemed to work fine.
<br><br>There&#39;s heaps of parallel stuff you can do in Squeak. One day I&#39;d like to have a crack at making the VM use pthreads more, but that will be the day after people actually start writing parallel code.<br><br>
Gulik.<br><br>-- <br><a href="http://people.squeakfoundation.org/person/mikevdg">http://people.squeakfoundation.org/person/mikevdg</a><br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a>