mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-29 01:34:29 +01:00
A nightly session's lease is a file lock, which the system frees only when every copy of its handle is closed or the lock is unlocked. A child process that any thread starts holds a copy of every handle until it runs its program. When a session ended during that time, by its controlled return or by the caught panic that frees the lease for the successor a graphics restart starts, the next launch found the lease held and kept no session record. Under cargo test, three nightly_session tests failed this way while the installed-root test started its child process. Session now unlocks the lease when it is dropped. A new test holds a copy of the lease's handle while a session completes and while one is dropped, and the next session takes the lease each time.