<div dir="ltr">AFAIK OS thread are capable of being assigned to multiple cores thus offering real concurency, thus I presume your native threads are not OS threads. So the VM run on one thread but can communicate with other threads ? Does that apply to multithreaded VM ?<br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 18, 2016 at 2:02 PM Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir="auto"><div>Hi Dimitris,<br></div></div><div dir="auto"><div><br>On Jan 18, 2016, at 3:29 AM, Dimitris Chloupis &lt;<a href="mailto:kilon.alios@gmail.com" target="_blank">kilon.alios@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div><div dir="ltr"><div>so I assume that means callbacks from inside C threads works fine which make it more than enough at least for now. <br></div></div></div></blockquote><div><br></div></div><div dir="auto">C threads us a misnomer.  Callbacks from native threads that are currently calling out work.  I /think/ callbacks from native threads that have previously called out but are not currently calling out work, but am not sure.  Callbacks from native threads the VM has not seen before don&#39;t yet work; the VM doesn&#39;t service them.<div></div></div><div dir="auto"><div><br><blockquote type="cite"><div><div dir="ltr"><div>Does that mean that the VM will implement a real threading mechanism ? </div></div></div></blockquote><div><br></div></div></div><div dir="auto"><div>This is a mechanism that allows one to freely share the VM between arbitrary native threads but only one thread can run the VM at any one time.  So it provides true multi threading but it does /not/ provide concurrency.</div></div><div dir="auto"><div><br></div><div><blockquote type="cite"><div><div class="gmail_quote"><div dir="ltr">On Mon, Jan 18, 2016 at 1:11 PM Craig Latta &lt;<a href="mailto:craig@netjam.org" target="_blank">craig@netjam.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
&gt; ...when Craig Latta tried to use [Alien FFI] late last year it worked<br>
&gt; up to a point.  The thing that didn&#39;t work was callbacks from foreign<br>
&gt; threads.  So it looks like the core threading code is not too far<br>
&gt; away from working.<br>
<br>
     (Yes, it seemed close enough that I spent several hours debugging,<br>
trying to get it the rest of the way. I ran out of time, so I wrote a<br>
wrapper C library around the one I wanted to use, with threaded C<br>
callback functions that signalled Smalltalk semaphores on which my<br>
synchronous-FFI Smalltalk process waited. A hack, but it worked fine and<br>
was simple.)<br>
<br>
<br>
-C<br>
<br>
--<br>
Craig Latta<br>
<a href="http://netjam.org" rel="noreferrer" target="_blank">netjam.org</a><br>
+31   6 2757 7177 (SMS ok)<br>
+ 1 415  287 3547 (no SMS)<br>
<br>
</blockquote></div>
</div></blockquote></div></div></blockquote></div>