mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-09-17 11:37:20 +03:00
Use 0 to initialize IORef instead of undefined
The "undefined" somehow gets evaluated even though it is overwritten immediately. The benchmarks crash due to this.
This commit is contained in:
parent
6c02648b7d
commit
44b0ff2ac3
@ -70,7 +70,7 @@ updateWithDelay clock precision timeVar = do
|
||||
-- writing to it.
|
||||
asyncClock :: Clock -> Double -> IO (ThreadId, Prim.IORef MicroSecond64)
|
||||
asyncClock clock g = do
|
||||
timeVar <- Prim.newIORef undefined
|
||||
timeVar <- Prim.newIORef 0
|
||||
updateTimeVar clock timeVar
|
||||
tid <- forkManaged $ forever (updateWithDelay clock g timeVar)
|
||||
return (tid, timeVar)
|
||||
|
Loading…
Reference in New Issue
Block a user