<div dir="ltr">Indeed, we&#39;d like to allow such a scenario and we are trying to figure out how to make this work and still be safe.<div><br></div><div>One interesting question is: what should happen if R is called from another Ruby thread?</div><div><br></div><div>If you have a precise use-case in mind, could you post an issue on <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_oracle_graal_issues&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=eIKRxCfjRcPMjxzcKW-CNvr62jScX8JoU1y-LOB6chk&s=pmPiv8Wq5RWl6BK5V1BzJxuAYi_v1F9WvWEuJvmKgGM&e=">https://github.com/oracle/graal/issues</a> to track it more easily?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 14, 2018 at 7:44 PM, Rodrigo Botafogo <span dir="ltr">&lt;<a href="mailto:rodrigo.a.botafogo@gmail.com" target="_blank">rodrigo.a.botafogo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Benoit!<div><br></div><div>Now, is it really necessary to prevent multithreaded when interfacing Ruby and R?  I understand that since R is not multithreaded, calling it from multiple threads will cause weird problems, but if the programmer is careful and say, only calls R from the same Ruby thread, everything should work fine, no?  If this is the case, then could there be a flag to allow multithreaded applications even in the presence of R?</div><div><br></div><div>Thanks</div><div><br></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 14, 2018 at 2:38 PM Benoit Daloze &lt;<a href="mailto:eregontp@gmail.com" target="_blank">eregontp@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="ltr">Note that one way to avoid MinitTest creating multiple threads is to give it `N=0` like<div><br></div><div>$ N=0 ruby -Xsingle_threaded=true mytest.<wbr>rb</div><div><br></div><div>I checked and this seems to work fine with GraalVM RC2 and minitest 5.10.1 (bundled) and 5.11.3 (latest).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 14, 2018 at 5:25 PM, Rodrigo Botafogo <span dir="ltr">&lt;<a href="mailto:rodrigo.a.botafogo@gmail.com" target="_blank">rodrigo.a.botafogo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I&#39;m trying to set up testing for my polyglot lib and I&#39;m having a hard time.  Sorry if I should post somewhere else...</div><div><br></div><div>So I tried to test with rspec, but rspec will run ruby somehow and does not pass to ruby the --polyglot --jvm flags.  Polyglot complains that R is not a known language.  I&#39;ve googled around and could not find an easy way to make rspec pass flags to ruby.  </div><div><br></div><div>Next I tried minitest, since in this case I call ruby directly with the required flags... but polyglot complains that R cannot execute in multithreaded, so I passed -Xsingle_threaded to ruby and minitest complains that it only runs in a multithreaded environment.</div><div><br></div><div>Any suggestions how to move forward?</div><div><br></div><div><br></div><div>Thanks</div><span class="m_8650703262678305573m_884301762383739274HOEnZb"><font color="#888888"><div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_8650703262678305573m_884301762383739274m_1500241590509904320gmail_signature">Rodrigo Botafogo<br></div></div></font></span></div>
<br>______________________________<wbr>_________________<br>
GraalVM-Users mailing list<br>
<a href="mailto:GraalVM-Users@oss.oracle.com" target="_blank">GraalVM-Users@oss.oracle.com</a><br>
<a href="https://oss.oracle.com/mailman/listinfo/graalvm-users" rel="noreferrer" target="_blank">https://oss.oracle.com/<wbr>mailman/listinfo/graalvm-users</a><br></blockquote></div><br></div>
</blockquote></div><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr" class="m_8650703262678305573gmail_signature" data-smartmail="gmail_signature">Rodrigo Botafogo<br>Integrando TI ao seu negócio<br>21-3010-4802/11-3010-1802</div>
</font></span></blockquote></div><br></div>