Commit Graph

3 Commits

Author SHA1 Message Date
v9v
721890d22f Fix race condition in autosave
Fixes the case where multiple tmux sessions call auto-save at the same time, which occasionally results in multiple instances of save_all() running in parallel and causing issues like #3 and tmux-plugins/tmux-resurrect#294.

The sequence in main() is:
1. Check enough_time_since_last_run_passed
2. Save
3. Update last_save_timestamp.

The race here is:
* process A finishes step 1 and is busy with step 2. The timestamp is not updated yet.
* process B comes to step 1, sees the old timestamp and proceeds to step 2, too.
2019-07-04 20:21:02 +02:00
Bruno Sutic
bdc47273d3
Properly quote scripts 2015-02-20 15:48:36 +01:00
Bruno Sutic
20a83738c0
Rename the plugin to 'tmux-continuum' 2015-02-20 13:38:09 +01:00