# development


12/31/2019, 12:28 AM
@hundreds-breakfast-49010 one idea is to use mdmfs (or tmpfs). We could then clean up ourself each time we start


12/31/2019, 12:38 AM
I think this would entail writing our own custom version of the
crate, at least for writes to temp dirs that happen in rust
type creates a directory on the file system that is deleted once it goes out of scope. At construction, the
creates a new directory with a randomly generated name."
this is what we're using to create the
dir. so if we wanted to create our own tmpfs filesystem, we'd have to replace this call with someting that knows how to write there
well, hm, I guess we could come up with a canonical location for this filesystem, and just make sure that every time we make a tmpdir we write it there, bypassing /tmp altogether
I am not 100% sure why the drop destructors aren't getting called as it is, but I suspect it's some weirdness with rust-python FFI
that's something we should be more mindful of, whenever we use rust code that assumes that some cleanup behavior will happen on drop, we should make sure that there's no chance execution will pass back to python before that time, or else we can't guarantee that python won't do something that will cause the program to exit without calling those destructors


12/31/2019, 1:45 AM
hm, ok. thank you for describing this in depth!
i didn’t realize that you were describing this issue with drop as separate from the /tmp cleanup issue


12/31/2019, 7:47 AM
well, I think it's the causal factor behind /tmp not getting cleaned up, at least in this case. but I ran into a case where rust destructers weren't getting run, probably because of FFI issues, at least once before