summaryrefslogtreecommitdiff
path: root/%2525252525253fid%2525252525253de3cfca7568c0481e30807a41a280752522af2838&id2%...
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-07-14 08:45:39 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2020-07-26 10:31:33 -0400
commit7b8b7f0548c2f71a1a068419f5712e2d7026485f (patch)
tree3127af0b623f2558faa82838325f939233de9736 /%2525252525253fid%2525252525253de3cfca7568c0481e30807a41a280752522af2838&id2%2525252525253d7b28e38d1307aa6c7bf4350b314dff1dc42b9731%25252525253fid%25252525253de3cfca7568c0481e30807a41a280752522af2838%252525253fid%252525253d7b28e38d1307aa6c7bf4350b314dff1dc42b9731%2525253fid%2525253d7b8b7f0548c2f71a1a068419f5712e2d7026485f%25253fid%25253d7b8b7f0548c2f71a1a068419f5712e2d7026485f%253fid%253d7b8b7f0548c2f71a1a068419f5712e2d7026485f%3fid%3d7b8b7f0548c2f71a1a068419f5712e2d7026485f?id=7b8b7f0548c2f71a1a068419f5712e2d7026485f
parent2230525f4a14ae9e8a5e7a76ae205101904a7f7f (diff)
Revert "Interrupt periodic save when launching process"
This reverts commit 0f3d198 (Interrupt periodic save when launching process, 2017-09-08). Stopping and starting periodic save when external/hook programs are run causes deadlocks. The periodic save thread cannot be stopped/started at will, but should be started once and run uninterrupted as long as calcurse runs. Only if the configuration parameter is changed, must the thread be stopped and possibly restarted. The reasons are - the start routine unconditionally starts a thread. - the mechanism used to detect whether a thread is running or not, is designed to be used by the main calcurse thread only and with only one running thread of each kind (the thread ID of each running thread is kept in a variable; if the thread is not running, the variable has the main thread ID as value). Any load hook will be run at the initial dataload, and the stop/start calls will start a perodic save thread (this is true for the notify thread as well). Later when threads are started, a second periodic save thread is started (for the notify thread, a running thread is stopped before restart). When hooks are run by the periodic save thread, the stop call breaks down, leading to two running save threads (if not the case already) and subsequently to a deadlock when one thread tries to stop the other. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to '%2525252525253fid%2525252525253de3cfca7568c0481e30807a41a280752522af2838&id2%2525252525253d7b28e38d1307aa6c7bf4350b314dff1dc42b9731%25252525253fid%25252525253de3cfca7568c0481e30807a41a280752522af2838%252525253fid%252525253d7b28e38d1307aa6c7bf4350b314dff1dc42b9731%2525253fid%2525253d7b8b7f0548c2f71a1a068419f5712e2d7026485f%25253fid%25253d7b8b7f0548c2f71a1a068419f5712e2d7026485f%253fid%253d7b8b7f0548c2f71a1a068419f5712e2d7026485f%3fid%3d7b8b7f0548c2f71a1a068419f5712e2d7026485f?id=7b8b7f0548c2f71a1a068419f5712e2d7026485f')
0 files changed, 0 insertions, 0 deletions