On Saturday, September 30, 2017 at 12:49:28 PM UTC+1, Dima Pasechnik wrote:
>
> oh yes, ipython 5+ uses threads in prompt handling.
>
> thus an extension can be started in a tab completion thread and then 
> called in the main thread, or the other way around.
>

At least I know that

from sage.libs.ecl import TAB

does crash Sage on FreeBSD in ECL with unpatched GC, and we did look at 
what happened with threads
in GC and concluded that it is due to ECL starting in a non-main thread.

I presume ECL is started on importing here, as introspection of extension 
members needs it starting.

I think ipython's people rationale is that such an operation (__dir__ 
method of the extension)
ought to be thread-safe.
(see https://github.com/ipython/ipython/issues/10315 for a similar case of 
an extension embedding JVM).


  

in some cases initialisation from a non-main thread might not even be 
> possible, due to lacking functionalty. A good example is ECL on FreeBSD, 
> where GC is like this (well, was, it is now fixed in GC dev, see 
> https://github.com/ivmai/bdwgc/issues/180)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to