MessageType
- The type of messages accepted by the actor.public interface HjActor<MessageType>
send()
method.
An actor has the following life-cycle:
The implementation of actors is also explained in the following papers:
Integrating Task Parallelism with Actors. Shams Imam, Vivek Sarkar. Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), October 2012.
Habanero-Scala: Async-Finish Programming in Scala. Shams Imam, Vivek Sarkar. The Third Scala Workshop (Scala Days 2012), April 2012.
Modifier and Type | Method and Description |
---|---|
void |
exit()
Calls to exit() signals the intention for the actor to terminate.
|
void |
pause()
Pauses the actor, i.e. the actors stops processing messages in its mailbox.
|
void |
resume()
Resumes a paused actor, i.e. the actor resumes processing messages from its mailbox.
|
void |
send(MessageType msg)
Sends a message to the Actor.
|
void |
start()
Causes the actor to start processing messages that have been sent to it. pause() messages before the actor has
started are ignored.
|
void |
start(HjPlace hjPlace)
Causes the actor to start processing messages that have been sent to it. pause() messages before the actor has
started are ignored.
|
void start()
void start(HjPlace hjPlace)
void exit()
void send(MessageType msg)
msg
- The message to send to this actorvoid pause()
void resume() throws IllegalStateException
IllegalStateException
- when resume() called when the actor is not in a paused stateCopyright © 2015 Rice University - Department of Computer Science. All rights reserved.