[commit: ghc] master: win32/Ticker: Stop ticker on exit (87fbf39)

git at git.haskell.org git at git.haskell.org
Sun Apr 23 15:06:10 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/87fbf39a61d2535a172fbcecec098730eba1777f/ghc

>---------------------------------------------------------------

commit 87fbf39a61d2535a172fbcecec098730eba1777f
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Sat Apr 22 09:33:31 2017 -0400

    win32/Ticker: Stop ticker on exit
    
    While debugging an unrelated issue I noticed that we leak a
    TimerQueueTimer on exit since we don't necessarily call stopTicker
    before exitTicker. Fix this.
    
    Test Plan: Validate on Windows
    
    Reviewers: simonmar, austin, erikd
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3477


>---------------------------------------------------------------

87fbf39a61d2535a172fbcecec098730eba1777f
 rts/win32/Ticker.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rts/win32/Ticker.c b/rts/win32/Ticker.c
index 7bc5ed5..27c9070 100644
--- a/rts/win32/Ticker.c
+++ b/rts/win32/Ticker.c
@@ -73,6 +73,7 @@ stopTicker(void)
 void
 exitTicker (bool wait)
 {
+    stopTicker();
     if (timer_queue != NULL) {
         DeleteTimerQueueEx(timer_queue, wait ? INVALID_HANDLE_VALUE : NULL);
         timer_queue = NULL;



More information about the ghc-commits mailing list