Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jberryman committed Aug 5, 2012
1 parent f08f044 commit df7eee2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 3 additions & 2 deletions Benchmark.hs
Expand Up @@ -14,7 +14,7 @@ import TreeExample
-- put benchmarking & optimizing on hold until we can figure out how to get
-- consistent results....

main = defaultMain [
main0 = defaultMain [
bench "calibrate" $ whnf sqrt 999999999
-- bgroup "actors" [
-- bench "insert 1000, query 1000" $ whnfIO $ testActors (2^10 - 1, 1000)
Expand All @@ -29,7 +29,7 @@ main = defaultMain [
-- ]
]


main = testActors (2^10 - 1, 1000) >>= print

-- DEBUGGING:
seed = 2876549687276 :: Int
Expand All @@ -51,6 +51,7 @@ testSet (x,y) = do
return payload

-- ACTORS
testActors :: (Int,Int) -> IO Int
testActors (x,y) = do
t <- spawn nil
mapM_ (insert t) $ friendlyList x
Expand Down
10 changes: 2 additions & 8 deletions Control/Concurrent/Actors.lhs
Expand Up @@ -177,20 +177,12 @@ This module exports a simple, idiomatic implementation of the Actor Model.

TODO
-----
0.3.0:
- better method for waiting for threads to complete. should probably use
actor message passing
- structured declarative and unit tests
- get complete code coverage into simple test module
- some sort of exception handling technique via Actors
(look at enumerator package)

0.4
- allow destructuring using UndecidableInstances (see mockup) on spawn, allowing for new, awesome synchronization semantics!
- make that also work with Behaviors of arbitrary input types using new GHC generics!



Later:
- performance tuning / benchmarking:
+ look at interface file: ghc -ddump-hi Control/Concurrent/Actors.hs -O -c
Expand All @@ -208,6 +200,7 @@ Later:
- take a look at threadscope for random tree test
- look at "let floating" and INLINEABLE to get functions with "fully-applied (syntactically) LHS"
- compare with previous version (cp to /tmp to use previous version)
- get complete code coverage into simple test module
- interesting solution to exit detection:
http://en.wikipedia.org/wiki/Huang%27s_algorithm
- dynamically-bounded chans, based on number of writers to control
Expand All @@ -227,6 +220,7 @@ Later:
- a pre-declared Mailbox for IO?

Eventually:
- some sort of exception handling technique (using actors?)
- abilty to launch an actor that automatically "replicates" if its chan needs more
consumers. This should probably be restricted to an `Action i ()` that we
repeat.
Expand Down

0 comments on commit df7eee2

Please sign in to comment.