[haskeline] #130: "Thread blocked indefinitely in an MVar operation" when pressing ctrl+c repeatedly

haskeline haskeline at projects.haskell.org
Sat Apr 26 00:54:38 BST 2014


#130: "Thread blocked indefinitely in an MVar operation" when pressing ctrl+c
repeatedly
----------------------+-----------------------------------------------------
Reporter:  nstoddard  |       Owner:     
    Type:  defect     |      Status:  new
Priority:  major      |   Milestone:     
 Version:             |    Keywords:     
----------------------+-----------------------------------------------------
 I have a function for handling ctrl+c that looks like this:

 {{{
 handleCtrlC :: a -> InputT IO a -> InputT IO a
 handleCtrlC a b = H.handle (ctrlC a) $ withInterrupt b where
   ctrlC def Interrupt = pure def
 }}}

 This code is used in another line of code that looks like this:
 "handleCtrlC (Just "Interrupted") $ getInputLine "> ". That code is called
 repeatedly from a REPL.

 When I press ctrl+c repeatedly while this is running, or just hold down
 the key combination, it eventually freezes up and a few seconds later
 gives the error "Main: thread blocked indefinitely in an MVar operation".

 I'm running Haskeline 0.7.1.2 (which isn't an option in the "version"
 field - you should probably fix that) on Windows 7.

-- 
Ticket URL: <http://trac.haskell.org/haskeline/ticket/130>
haskeline <http://example.org/>
My example project


More information about the Haskeline mailing list