[Haskell-cafe] Need a concurrency advice
Dinh Tien Tuan Anh
tuananhbirm at hotmail.com
Mon Aug 22 11:39:15 EDT 2005
Hi,
Basically, my program has 7 threads for 7 rules
Rule1
Rule2
..
..
..
and they all use pattern-mattching (a rule MUST be evaluated by a thread)
The problem is there are some overlapping rules, which match the same
pattern and diifferent rules are likely to give different results (one rule
might give a result, others might loop forever).
Also, for a particular pattern, there's at least one matching rule and there
may be some rule looping forever (try to evaluate a "bottom" _|_)
Im thinking of getting a list of all the applicable rules for a pattern,
then hopefully can choose the best rule out of it. But we have no control
over the scheduling of threads, so dont know when a thread finishs its
evaluation (if it is applicable rule) or it just never terminates (rule that
tries evaluating a _|_)
So any ideas ?
TuanAnh
_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
More information about the Haskell-Cafe
mailing list