<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-04-18 18:35 GMT+02:00 Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="auto"><div>Hi Nicolai,</div><div><br></div><div>    I&#39;m rather excited that you&#39;re interested in this.  Perhaps we (you, Esteban, Clément and I) could meet in a google hangout to discuss soon?</div><div><br></div><div>As Esteban said I was able to demonstrate threaded calls on Mac.  CoInterpreterMT is the subclass of <span>CoInterpreter that adds support for threading. But the code is out-of-date.  So some work is needed to get back to where I was.  But to have someone focused on this is the key.  I don&#39;t think we have someone with the cycles yet and if you&#39;re that person (and can talk to </span><span>Esteban, Clément and I, and maybe Ronie and Doug McPherson and Thierry) then I&#39;m sure we can get it working soon.  Spur has the necessary pinning support for example.</span><br></div></div></blockquote><div><br></div><div>Well, I am not sure I can be a help :)<br></div><div>And I spend my main time for fixing issues in the core image. <br>But I would like to help if I can.<br><br></div><div>About the CoInterpreterMT, is it possible to get this working with the NB additions? <br>It would be great but it sounds too simple, but would it work if we use a MT VM with NB additions and<br></div><div>change the NB callback entry/leave code to make calls to ownVM and disownVM <br>(for callbacks defined in the main vm thread, but called by some native code in another thread) ?<br><br></div><div>I am not sure if we need spurs pinning support here, because the current NB implementation works without it.<br><br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><br>Eliot (phone)</div><div><br>On Apr 18, 2015, at 9:24 AM, Nicolai Hess &lt;<a href="mailto:nicolaihess@web.de" target="_blank">nicolaihess@web.de</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div><div dir="ltr">Thank you Esteban,<br><div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-18 9:36 GMT+02:00 Esteban Lorenzano <span dir="ltr">&lt;<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div style="word-wrap:break-word">Hi, <div><br></div><div>So… “multithread” is a complicated issue. Pharo as most Smalltalks is designed thinking is as monolithic so if you are trying to make the image to work in different processes… it will not be easy at all :)</div><div>Time ago Eliot did a prototype (more than a prototype in fact, but still far from “production ready”) to have Threaded FFI and I’m quite sure this is the way to go, at least as a 1st milestone. </div><div><br></div><div>I already have a process building this experimental VM:</div><div><br></div><div><a href="https://ci.inria.fr/pharo/view/VM/job/CogMTVM/" target="_blank">https://ci.inria.fr/pharo/view/VM/job/CogMTVM/</a></div></div></blockquote><div><br></div><div>But this one does not include NativeBoost support. Do we have a build with MT and NB?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>(No idea why windows build failed last two times… this can be a random fail).</div><div><br></div><div>I do not remember exactly the changes needed in the image to take advantage of it… it was just an instVar in Process, I think, but then FFI package was adapted to take advantage of this… no idea where it is now (if is already incorporated in latest FFI, which we have).</div><div><br></div><div>Then, after this… I imagine the callback mechanism can be adapted to work in multithread environments but probably we will need something like isolates from Dart to provide some degree of multithread processing without killing the image (but I’m just thinking in loud here, this can be a really bad idea, and probably there are other ways to do this better… I will let Eliot to explain better). </div><div><br></div><div><b>TL;DR: </b>Start for the CogMTVM, is the way to go.</div><div><br></div><div>cheers, </div><div>Esteban</div><div><br><div><blockquote type="cite"><div>On 17 Apr 2015, at 09:06, Nicolai Hess &lt;<a href="mailto:nicolaihess@web.de" target="_blank">nicolaihess@web.de</a>&gt; wrote:</div><br><div><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi, <br><br></div>I&#39;ve tried to build a pharovm with multithread support. I changed the config in the <br></div>pharo generator.image to use the cogmt config and was able to build a vm.<br></div>But this vm crashes on startup. (windows7)<br><br>Is this the right way and did anyone got this to work (windows or linux)?<br><br></div>And can this work to make NB callbacks working for multithreaded libraries.<br></div><br>(I made some simple bindings for the gstreamer lib with NB, this works<br></div>for simple calls (create element/change state). But I guess this won&#39;t work<br></div>for any gstreamer function that requests a callback that may b e called from<br></div>a different thread)<br><br></div>Would this be the right way to do:<br></div>- build a vm with MT support<br></div>- guard the NB callback entry/leave code with the ownVM()/disownVM() call.<br><br></div>Or is there more to do.<br><br></div><div>Thanks in advance<br></div><br><br></div>nicolai<br><div><div><div><br><br></div></div></div></div>
</div></blockquote></div><br></div></div><br></blockquote></div><br></div></div></div>
</div></blockquote></div><br></blockquote></div><br></div></div>