spaulaus / paass

Pixie Acquisition and Analysis Software Suite - maintained by Project Science
GNU General Public License v3.0
0 stars 2 forks source link

Update Poll2 to use atomic locks #6

Open spaulaus opened 5 years ago

spaulaus commented 5 years ago

Expected Behavior

When the program crashes, the lock is released.

Current Behavior

If the program crashes and exits awkwardly then the lock will not be released.

Context

Users sometimes delete active lock files on a shared system. This causes a lot of issues when you try to connect to an active module. Related to spaulaus/paass-lc#179

Possible Solution (optional)

The lock should be atomic. This would mean that the lock would destroy itself if the associated process crashes. This would remove issues with locks from old processes blocking new processes that would not interfere. By removing this the users no longer delete lock files and thus reduces the possibility of one user deleting the lock as the other is actively using the process.

Acceptance Criteria