rsc3/doc-schelp/HelpSource/Classes/ParGroup.schelp

54 lines
1.7 KiB
Text

Class:: ParGroup
summary:: Client-side representation of a parallel group node on the server
categories:: Server>Nodes, Server>Abstractions
Description:: Parallel Groups are server-side node containers that work similar to link::Classes/Group::s, but without
ordering constraints for the contained nodes. This means that on parallel architectures the elements of a Parallel Group
can be executed concurrently.
ClassMethods::
private:: creationCmd
subsection:: Creation with Immediate Instantiation on the Server
copymethod:: Group *new
subsection:: Convenience methods for add actions
The following convenience methods correspond to the add actions above:
copymethod:: Group *after
copymethod:: Group *before
copymethod:: Group *head
copymethod:: Group *tail
copymethod:: Group *replace
subsection:: Creation without Instantiation on the Server
Like with Groups, it is possible to create a a ParGroup object without immediately creating a parallel group in the server.
method:: basicNew
Create and return a ParGroup object without creating a group node on the server. (This method is inherited from Node and is documented here only for convenience.)
argument:: server
An optional instance of Server. If nil this will default to the default Server.
argument:: nodeID
An optional node ID number. If not supplied one will be generated by the Server's NodeIDAllocator. Normally you should not need to supply an ID.
discussion::
For a detailed discussion please refer to link::Classes/Group#*basicNew::.
Examples::
code::
fork {
p = ParGroup.new;
loop {
(
degree: rrand(0.0, 12.0).round(1/4),
group: p,
db: rrand(-30, -25),
pan: rrand(-1.0, 1.0)
).play;
0.2.wait;
}
}
::