Custom Query (7510 matches)
Results (10 - 12 of 7510)
|#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 where 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.
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.
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" http://www.nomaware.com/monads/, created a couple of examples.