zsh-histdb icon indicating copy to clipboard operation
zsh-histdb copied to clipboard

Race condition with tmux synchronised panes

Open ScrumpyJack opened this issue 3 years ago • 1 comments

With several synchronised panes open in tmux, while typing a command, there's a race to write to the db.

One pane will be successful, then each other pane might error with "Error: near line #some_line_number: database is locked" pane number -1 times. So the forth pane will sometimes error up to three times, (in not particular order).

As the command executed in each pane, by nature, is the same (panes are sync'ed), it would be awesome if there was a way to detect that and have only one pane write to the db.

tmux doesn't set an explicit enough environment to be able to detect this, so I'm at a loss as to how this could be addressed.

ScrumpyJack avatar Mar 17 '21 09:03 ScrumpyJack

Just found #27

ScrumpyJack avatar Mar 17 '21 09:03 ScrumpyJack