On Saturday, January 31, 2015 at 11:57:14 AM UTC-8, Jeroen Demeyer wrote: > > On 2015-01-31 19:22, Nils Bruin wrote: > > Another is to put all the "__del__" code into a separate object that the > > "parent" object holds a reference to, but that itself does not refer to > > the parent. Then the __del__-equipped object is not involved in a cycle. > Obvious question: do we need a custom __del__ in the first place? >
My guess is: yes. I imagine that the __del__ kills the process that is being interfaced and closes/cleans up any temporary files in the process. We could hope that the implied close on whatever streams are providing access propagates an EOF to the process and we could hope that that leads to process termination, but the pseudoterminal sitting in between might ruin that (I don't know) and it would limit us to interfaces with programs that terminate when receiving an EOF on their stdin. A possible solution would be to put the destruction in a cython __dealloc__ but the current implementation requires a fully functional python object (in order to call .quit()). -- 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 http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.