From 3731c92d899c2e5959f4cdb24bc34d5d372c8c69 Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: Sun, 23 Feb 2020 18:34:57 +0000 Subject: Timer coalescing: handle exceptions in timer coordination thread This corrects my (wrong) assumption that the timer coordination thread will only fail if there's an error in the code, and in that case any attempt to recover is futile. It turns out that the thread does fail recoverably in one notable case: when running in the non-threaded RTS, registerDelay fails immediately. And we probably still wish for xmobar to support the non-threaded RTS. One way to solve this issue is to add a bunch of #ifdefs and compile the code only in the threaded case. This would double the number of configurations that need to be tested, though. Instead, let's make the code robust against all kinds of exceptions in the timer coordination thread, and get non-threaded RTS support for free. --- xmobar.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmobar.cabal') diff --git a/xmobar.cabal b/xmobar.cabal index 02dc87f..f23275f 100644 --- a/xmobar.cabal +++ b/xmobar.cabal @@ -72,7 +72,7 @@ flag with_xpm default: False flag with_threaded - description: Use threaded runtime. + description: Use threaded runtime. Required for timer coalescing (less power usage). default: False flag with_rtsopts -- cgit v1.2.3