--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
+1 for something like this rolled into the toolkit.
My usecase for this is using a set of actors to run a monte carlo
simulation, sending results to an aggregator. Each sample is modelled
as a message.
The aggregator can stop the simulation early (after mean has converged
within a tolerence), and would send a Stop message to the workers.
I'm just using an AtomicBoolean at the moment.
Incidentally, the aggregator actor would benefit from dispatcher level
prioritization, so it doesn't fall behind.
Actually, I'm currently using scalaz.concurrent.Actor for this, but a
few more features like this and I might be tempted to jump ship ;)
-jason
Already in master, see PriorityExecutorBasedEventDrivenDispatcher, you can specify your own Comparator for the priority.
You can also do: new -ebedd-dispatcher-type- with PriorityMailbox and then in the class body define: val comparator ...
Enjoy
On Mar 14, 2011 10:57 AM, "Jason Zaugg" <jza...@gmail.com> wrote:
On Wed, Mar 9, 2011 at 4:27 PM, √iktor Klang <viktor...@gmail.com> wrote:
> You'll have to implem...
[snip]
> val a = actorOf(...)
+1 for something like this rolled into the toolkit.
> a.dispatcher = PriorityMessageDispatcher.instance
> a.start
My usecase for this is using a set of actors to run a monte carlo
simulation, sending results to an aggregator. Each sample is modelled
as a message.
The aggregator can stop the simulation early (after mean has converged
within a tolerence), and would send a Stop message to the workers.
I'm just using an AtomicBoolean at the moment.
Incidentally, the aggregator actor would benefit from dispatcher level
prioritization, so it doesn't fall behind.
Actually, I'm currently using scalaz.concurrent.Actor for this, but a
few more features like this and I might be tempted to jump ship ;)
-jason
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To...