Documentation for pulsar 0.5.0. For development docs, go here.
An asynchronous shell for experimenting with pulsar on the command line. To use write a little script, lets call it pshell.py:
from pulsar.apps.shell import PulsarShell
if __name__ == '__main__':
PulsarShell().start()
And run it:
python pshell.py
The shell has already pulsar, get_actor(), spawn(), send() and the Actor class in the global dictionary:
>>> pulsar.__version__
0.5.0
>>> actor = get_actor()
>>> actor.info_state
'running'
>>> a = spawn()
>>> a.done()
True
>>> proxy = a.result
When the worker starts, create the Actor.thread_pool with one thread only and send the interact() method to it.
Handled by the Actor.thread_pool