• how to pass parameter into catch and how to see how many concurrent thr

    From meInvent bbird@21:1/5 to All on Fri Jul 29 21:13:29 2016
    let maxmagic mm = do let {allexprs1 = concat (alltrees1 mm)};let {alltrees1a = [ (x, sum $ (eeval1 x)) | x <- allexprs1]};let {alltrees1b = [ (eeval1 x, sum $ (eeval1 x)) | x <- allexprs1]}; let {alltrees1c = [ (eeval1 x, (x, sum $ (eeval1 x))) | x <-
    allexprs1]};let {bb1true = [ (x,27.0) | (x,27.0) <- alltrees1a ]};let {true1print = [peval (fst (bb1true!!i)) | i <- [0..(length bb1true-1)]]};print ("doing"++show(mm)++"\n");writeFile ("alltrees"++(show mm)++".txt") $ (unlines $ map show $ true1print)


    forM_ [0..((length getoperationlist)-1)] $ \ p -> forkIO $ forever $ do catch (maxmagic p) handler where handler (\_ -> putStrLn $ "Caught exception: ")

    i find it maxmagic can not receive parameter p

    i forkIO 10 times,
    if i have a dual core,

    does it mean that 2 threads concurrently run on each cpu, and 8 threads waiting?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)