`Session` is a cheap wrapper around an `Arc<Inn...
# development
a
Session
is a cheap wrapper around an
Arc<InnerSession>
which we clone and drop all over the place;
InnerSession
is the thing that has the correct lifetime
h
if I implement
Drop
on
InnerSession
, and just have the drop method print a line, I find that that line never gets printed
which I assume has something to do with interaction with the python FFI
I actually even added a panic and I forgot that I had left that in the code - it never gets called
a
Interesting… Maybe we keep too many references to the Python
Session
object, or it’s referenced in a cycle somewhere, or something?
Maybe we need to explicitly call
session_destroy
where we expect to be done with the
Session
on the Python side, rather than relying on
ffi.gc
to call it?
h
@average-vr-56795 when on the python side can we be sure we're done with a session?
also maybe it doesn't matter, and we can just start/stop a thread that polls the
Session
for the latest workunts purely in python
which is the approach I'm currently taking
a
LocalPantsRunner._run
creates (via one of its method calls) the
Session
, and the
Session
can be cleaned up before that method returns