[Haskell-cafe] Need a concurrency advice
Dinh Tien Tuan Anh
tuananhbirm at hotmail.com
Mon Aug 22 11:39:15 EDT 2005
Basically, my program has 7 threads for 7 rules
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 ?
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
More information about the Haskell-Cafe