The aim is to create a simple but effective way to use concurrency in Javascript. The API for the worker interface is nice and compact, but this means that you will have to implement all code yourself. This framework will gie you a way to skip writing boilerplate code.
Aurora is inspired by Scala and Akka Actors.
In this example we will create a new Actor, set the message handling function and send it a message. It will then return this message.
var actor = new Actor();
actor.init();
actor.receive(function(msg){
return msg;
});
actor.send('Hello world');
In this second example we will sort an array in a separate thread.
var actor = new Actor();
actor.init();
actor.receive(function(array)
{
return array.sort();
}
);
actor.send([2,6,4,10,3,7]);