1{-# LANGUAGE BangPatterns #-}
5import Control.Concurrent (threadDelay)
6import Data.IORef (readIORef, writeIORef, atomicModifyIORef)
7import Network.Wai.Handler.Warp.Thread
14spec = describe "forkIOwithBreakableForever" $ do
15 it "can be breakable" $ do
16 ref' <- forkIOwithBreakableForever True $ \ref -> do
18 !_ <- atomicModifyIORef ref (\x -> (False, x))
21 readIORef ref' `shouldReturn` False
22 _ <- breakForever ref'
26 readIORef ref' `shouldReturn` True
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list