mirror of
https://github.com/facebook/Haxl.git
synced 2024-12-24 17:23:03 +03:00
Merge pull request #34 from kantp/thunkleak
Close thunk leak in roundstats.
This commit is contained in:
commit
1d996291a4
@ -56,6 +56,7 @@ import Control.Exception (AllocationLimitExceeded(..))
|
||||
import Control.Monad
|
||||
import qualified Control.Exception as Exception
|
||||
import Control.Applicative hiding (Const)
|
||||
import Control.DeepSeq
|
||||
import GHC.Exts (IsString(..))
|
||||
#if __GLASGOW_HASKELL__ < 706
|
||||
import Prelude hiding (catch)
|
||||
@ -526,7 +527,7 @@ performFetches n env reqs = do
|
||||
let roundtime = realToFrac (diffUTCTime t1 t0) :: Double
|
||||
|
||||
ifReport f 1 $
|
||||
modifyIORef' sref $ \(Stats rounds) ->
|
||||
modifyIORef' sref $ \(Stats rounds) -> roundstats `deepseq`
|
||||
Stats (RoundStats (microsecs roundtime) dsroundstats: rounds)
|
||||
|
||||
ifTrace f 1 $
|
||||
|
@ -31,6 +31,7 @@ library
|
||||
base == 4.*,
|
||||
bytestring >= 0.9 && < 0.11,
|
||||
containers == 0.5.*,
|
||||
deepseq,
|
||||
directory >= 1.1 && < 1.3,
|
||||
filepath >= 1.3 && < 1.5,
|
||||
hashable == 1.2.*,
|
||||
|
Loading…
Reference in New Issue
Block a user