seq  1.1.0
 All Classes Namespaces Files Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
seqlib.nodes.parallel.Parallel Class Reference

Parallel node definition. More...

Inheritance diagram for seqlib.nodes.parallel.Parallel:

Public Member Functions

def __attrs_post_init__
 
def __repr__
 
def make_sequence
 
def __attrs_post_init__
 
def __repr__
 
def make_sequence
 

Static Public Member Functions

def create
 Creates a :class:Parallel node. More...
 
def create
 Creates a :class:Parallel node. More...
 

Public Attributes

 name
 
 seq
 

Static Public Attributes

tuple seq_args = attr.ib(kw_only=True, default=attr.Factory(list), repr=False)
 

Detailed Description

Parallel node definition.

Use the :meth:`create` method to build properly :class:`Parallel` nodes.
Since it inherits from :class:`Sequence` it has access to the same context variables.

Examples

1 One can access the running Sequence using Sequence.current_tpl context variable.
2 
3 >>> s = Parallel.create(a,b, name="my sequence")
4 # execute Sequence
5 >>> await s.start()
6 # Get running Sequence from Inside function a():
7 >>> def a():
8 ... current_tpl = Sequence.current_tpl
9 ... # now current_tpl is the node s
10 ... assert current_tpl == s

Member Function Documentation

def seqlib.nodes.parallel.Parallel.__attrs_post_init__ (   self)
def seqlib.nodes.parallel.Parallel.__attrs_post_init__ (   self)
def seqlib.nodes.parallel.Parallel.__repr__ (   self)
def seqlib.nodes.parallel.Parallel.__repr__ (   self)
def seqlib.nodes.parallel.Parallel.create (   args,
  kw 
)
static

Creates a :class:Parallel node.

       *args: Variable length list of nodes or coroutines that compose the sequence.
Parameters
idNode id
namenode name
def seqlib.nodes.parallel.Parallel.create (   args,
  kw 
)
static

Creates a :class:Parallel node.

       *args: Variable length list of nodes or coroutines that compose the sequence.
Parameters
idNode id
namenode name
def seqlib.nodes.parallel.Parallel.make_sequence (   self)
def seqlib.nodes.parallel.Parallel.make_sequence (   self)

Member Data Documentation

seqlib.nodes.parallel.Parallel.name
seqlib.nodes.parallel.Parallel.seq
tuple seqlib.nodes.parallel.Parallel.seq_args = attr.ib(kw_only=True, default=attr.Factory(list), repr=False)
static

The documentation for this class was generated from the following files: