aboutsummaryrefslogtreecommitdiffstats
path: root/src/queue.c
Commit message (Collapse)AuthorAgeFilesLines
* Legalese for queue.cLars Henriksen2019-01-121-0/+36
| | | | | Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* Mutex for the system message queueLars Henriksen2018-10-211-3/+9
| | | | | | | The main thread only reads and removes events from the queue. All other threads only insert events in the queue. Hence, only insertion and removal need protection. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
* System message queueLars Henriksen2018-10-211-0/+90
The screen and user interaction is managed by the main thread. Other parts of calcurse (threads) wishing to use the screen or communicate with the user, must do it via the main thread. For this purpose the main input loop is extended with a message queue. A thread may insert a message in the queue. The main thread tests for messages before listening for user commands. If a message is present, it is displayed (in a popup window) for the user to acknowledge. Depending on the message other actions may be performed, e.g. the message could be turned into a "system appointment/event" and inserted among the usual appointments. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>