Documentation for pulsar 0.5.0. For development docs, go here.

Asynchronous Shell

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

Implementation

class pulsar.apps.shell.PulsarShell(callable=None, load_config=True, **params)[source]
worker_start(worker)[source]

When the worker starts, create the Actor.thread_pool with one thread only and send the interact() method to it.

interact(worker)[source]

Handled by the Actor.thread_pool

Table Of Contents

Previous topic

Asynchronous Test Suite

Next topic

JSON-RPC

This Page