Threading using the Actor Model...

BlitzMax Forums/BlitzMax Programming/Threading using the Actor Model...

Arowx(Posted 2009) [#1]
Have you heard of the Actor model, in effect where an 'Object' is an actor that recieves messages from other Actors... Nothing new but it is used in parrallel programming as the messages are delivered into a mailbox and processed by the actor.

In addition messaging is the only way to change the state of an actor.

But the benefits are the message handling and passing is threadsafe and allows for actors to run on seperate threads!

So I was wondering as a Noob to threading and as the Actor model is used in other languges to simplify threaded development could the Actor model be easily implemented in a threadable programming way in BlitzMax?

Found a good article link here from a java perspective but recent.

Done some more digging and it appears to be the functional Erlang language with it's in built message passing and the currently trendy Scala language that provide the Actor style model as a in built in concurrency mechanism.


Otus(Posted 2009) [#2]
I implemented a simple actor model some time ago. You can find it in the code archives: here.


Arowx(Posted 2009) [#3]
@Otus excellent I'll give this a whirl still learning but hopefull I'll be ale to generate threaded programs more easily with this!