Custom Query (7510 matches)


Show under each result:

Results (10 - 12 of 7510)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#8158 fixed Replace IO manager's IntMap with a mutable hash table AndreasVoellmy bos

I've written a patch that replaces the immutable IntMap used by GHC.Event with a mutable hashtable, IntTable.

There's a standalone version of the new data structure, complete with QuickCheck tests and benchmarks, available on github. It's about 15x faster than IntMap, and substantially simpler.

In practice, this translates to a small but measurable improvement in throughput (and presumably latency). I see a 3% to 10% bump in requests handled per second by the tiny acme-http http server when benchmarked using the weighttp load tester.

#10017 fixed signal handlers are invoked multiple times when the threaded rts is used AndreasVoellmy redneb

When you install a custom signal handler and the threaded rts is being used, then the signal handler will be invoked multiple times. Here's a program that the demonstrates this:

import Control.Concurrent
import System.Posix.Signals

main :: IO ()
main = do
    _ <- flip (installHandler sig) Nothing $ Catch $
        putStrLn $ "Received signal " ++ show sig
    raiseSignal sig
    threadDelay 100000
    sig = sigUSR2

If you compile this with the -threaded flag and then run it with say +RTS -N4 then it produces the following output:

Received signal 12
Received signal 12
Received signal 12
Received signal 12
Received signal 12

In general the signal handler is invoked n_capabilities+1 times. This also happens with all other signals.

This regression was introduced by f9f89b7884ccc8ee5047cf4fffdf2b36df6832df (which was later reverted but then re-added), a commit addressing #9423.

The cause of the problem is this loop. I don't understand why we need to write an event about the signal received in the per capability control pipe introduced by the aforementioned commit. Aren't these control pipes supposed only to be used to shutdown the capabilities (which happens here)?

Removing the loop seems to solve the issue, but I don't know if it makes #9423 reappear. I cannot test this on a Mac OS X right now.

#1169 fixed Control.Monad.Cont documentation Andriy Andriy

Currently this important monad module does not have any haddock comment.

Per Jeff Newbern's gracious permission included relevant information from his cool tutorial "All About Monads", created a couple of examples.

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Note: See TracQuery for help on using queries.