Re: [polyml] Callback from a foreign thread

2022-11-14 Thread Phil Clayton
Thanks David, I will try this out then. The aim is to use GTask (from GLib) from ML. Phil On 14/11/2022 08:50, David Matthews wrote: Phil, It should work although I don't think I've ever actually tested it.  At the start of a callback the code calls PolyX86GetThreadData to get the ML thread

Re: [polyml] Callback from a foreign thread

2022-11-14 Thread David Matthews
Phil, It should work although I don't think I've ever actually tested it. At the start of a callback the code calls PolyX86GetThreadData to get the ML thread data including a reference to the ML stack. This is stored in thread-local storage. If it is empty it assumes this is a new thread an

[polyml] Callback from a foreign thread

2022-11-13 Thread Phil Clayton
I am wondering whether it is possible for a new thread to be created in foreign code by some other library and for the new thread to call back into ML.  As the new thread would not be created by Poly/ML, presumably it would not have its own ML stack and that sounds problematic, given the descri