summaryrefslogtreecommitdiff
path: root/Assistant/DaemonStatus.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-28 15:41:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-28 15:41:49 -0400
commitca478b7bcb48fee0d1a97340e6ea5da8e97074f0 (patch)
tree26797676ecc88b0cc9686da2fc9557456768aa8f /Assistant/DaemonStatus.hs
parent0a66947e3b8532b902ee5969c5659fe0fd42272c (diff)
Focus today was writing a notification broadcaster.
This is a way to send a notification to a set of clients, any of which can be blocked waiting for a new notification to arrive. A complication is that any number of clients may be be dead, and we don't want stale notifications for those clients to pile up and leak memory. It took me 3 tries to find the solution, which turns out to be simple: An array of SampleVars, one per client. Using SampleVars means that clients only see the most recent notification, but when the notification is just "the assistant's state changed somehow; display a refreshed rendering of it", that's sufficient.
Diffstat (limited to 'Assistant/DaemonStatus.hs')
0 files changed, 0 insertions, 0 deletions