On 07/18/2013 04:39 PM, Harald Oehlmann wrote: > Thank you, Massimo, for the good E-Mail. > > The slave interpreter issue was not on my radar and should probably > be attacked too - bug id, demo script ?
is it a bug or a feature? I thought it was the latter, at least in the original designer intentions > > I wondered why TCL is not shut down properly with Tcl_Finalise. > me too > Well, there is written, that there is interaction with WebSH. > > What practically happens up to now if Tcl_Finalize is called in the > slave interpreter is, that the Notifier Thread of the master > interpreter is stopped due to the still open pipe link. > > This might be the reason, why there is any interaction with Websh > (and of cause also Rivet, as all Rivet slaves have this connection. > > IMHO, fileevents must work, otherwise Rivet is not functional. > > To reach this, I only see: > > 1) create interpreters only in worker threads and not in the master > thread on an unpatched TCL this would break the way RivetServerInit works. > > 2) in a patched or newer version of TCL, the current way may be > used. Then, Tcl_InitNotifier and Tcl_FinalizeNotifier calls should > be inserted in child initialization and deletion. > I got fileevent working again by inserting Tcl_FinalizeNotifier in Rivet_InitHandler and Tcl_InitNotifier in Rivet_InitTclStuff (at the cost of breaking the inheritance of an interpreter from the parent to the child process) > I only see doing this: - by auto-detection of the tcl version > (>=8.6.1, >=8.5.15) - by a parameter - or a combination, to say, do > autodetection, and for older TCL's, use 2 only after a parameter like > "--broken-master-interpreter". > I haven't see any reactions to your message to TCLCORE, we maybe should reiterate it or put the question in a simplified form. I was thinking of something that could be a basis for a TIP, something that sounds like "Improved Tcl subsystems control on Unix systems" > The call to "Tcl_InitNotifier" does not harm currently and may be > immediately included. > > I am sorry, this sounds hard, but I see no alternative... > > My admiration to all active people, enjoy the beautiful summer, we > will bike to the wine yards this evening and on friday, dance tango > outside as, a friend told, his italien friends do... Harald > I wish I had the same bucolic view of Italy :-) -- -- Massimo Manghi Dipartimento di Neuroscienze Unità di Biofisica e Fisica Sanitaria via Volturno 39 43125 Parma --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
