Re: [GHC] #1048: Add forkIO that starts in 'block' mode
#1048: Add forkIO that starts in 'block' mode -+-- Reporter: ChrisKuklewicz | Owner: simonmar Type: feature request | Status: closed Priority: normal | Milestone: 6.10 branch Component: libraries/base |Version: 6.6 Severity: normal | Resolution: fixed Keywords: concurrency | Difficulty: Easy (1 hr) Testcase: | Architecture: Multiple Os: Multiple | -+-- Changes (by simonmar): * status: new = closed * resolution: = fixed Comment: Finished: {{{ Wed Jul 9 06:55:58 PDT 2008 Simon Marlow [EMAIL PROTECTED] * forkOS: start the new thread in blocked mode iff the parent was (#1048) This matches the behaviour of forkIO }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1048#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #1048: Add forkIO that starts in 'block' mode
#1048: Add forkIO that starts in 'block' mode -+-- Reporter: ChrisKuklewicz | Owner: simonmar Type: feature request | Status: new Priority: normal | Milestone: 6.10 branch Component: libraries/base |Version: 6.6 Severity: normal | Resolution: Keywords: concurrency | Difficulty: Easy (1 hr) Testcase: | Architecture: Multiple Os: Multiple | -+-- Comment (by simonmar): Partially done: {{{ Tue Dec 4 03:09:47 PST 2007 Simon Marlow [EMAIL PROTECTED] * forkIO starts the new thread blocked if the parent is blocked (#1048) }}} I needed to fix various Ctrl-C problems in 6.8.1, and this seemed the least invasive way to do it. forkOS is not done, so leaving the ticket open for now. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1048#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #1048: Add forkIO that starts in 'block' mode
#1048: Add forkIO that starts in 'block' mode -+-- Reporter: ChrisKuklewicz | Owner: Type: feature request | Status: new Priority: normal | Milestone: 6.10 branch Component: libraries/base |Version: 6.6 Severity: normal | Resolution: Keywords: concurrency | Difficulty: Easy (1 hr) Testcase: | Architecture: Multiple Os: Multiple | -+-- Changes (by simonmar): * milestone: 6.8 branch = 6.10 branch -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1048#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #1048: Add forkIO that starts in 'block' mode
#1048: Add forkIO that starts in 'block' mode -+-- Reporter: ChrisKuklewicz | Owner: simonmar Type: feature request | Status: new Priority: normal | Milestone: 6.10 branch Component: libraries/base |Version: 6.6 Severity: normal | Resolution: Keywords: concurrency | Difficulty: Easy (1 hr) Testcase: | Architecture: Multiple Os: Multiple | -+-- Changes (by simonmar): * owner: = simonmar -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1048#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #1048: Add forkIO that starts in 'block' mode
#1048: Add forkIO that starts in 'block' mode -+-- Reporter: ChrisKuklewicz | Owner: Type: feature request | Status: new Priority: normal | Milestone: 6.8 Component: libraries/base |Version: 6.6 Severity: normal | Resolution: Keywords: concurrency | Difficulty: Easy (1 hr) Testcase: | Architecture: Multiple Os: Multiple | -+-- Changes (by igloo): * milestone: = 6.8 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1048 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #1048: Add forkIO that starts in 'block' mode
#1048: Add forkIO that starts in 'block' mode +--- Reporter: ChrisKuklewicz | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 6.6 Severity: normal |Keywords: concurrency Difficulty: Easy (1 hr) |Testcase: Architecture: Multiple | Os: Multiple +--- The current forkIO starts in 'unblock' mode and the spawned thread can receive asynchronous exceptions (and die) before the passed (IO ()) action can start to run. Even if the user tried (forkIO (block io)) the new thread can be killed before entering the scope of block. Proposal: Add forkBlockedIO that spawns the new thread in a 'block' state. Alternative: Add forkInheritIO that spawns the new thread in the same block or unblock state as the parent thread is at the forkInheritIO call. Thus (forkBlockedIO = block . forkInheritIO) and (forkIO = unblock . forkInheritIO). Work around: At the moment a fresh MVar can immediately be used by the parent to wait until the child has signaled that it is executing withing the scope of the block (or exception handler, etc). This ought to also be extended to forkBlockedOS or forkInheritOS. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1048 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs