Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Process instances are functions which you can run to, uhm..., run them... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// Preferred method (for code clarity): // retrieve "foo" then run it Processes("foo")(runData, ignoreQueueSize); // Exactly the same as doing this: Processes("foo").run(runData, ignoreQueueSize); // Alternate method (for code brevity): // run a "foo" via it's global function foo(runData, ignoreQueueSize); // Exactly the same as: foo.run(runData, ignoreQueueSize); // ...all four methods do exactly the same thing, they are just different syntaxes. |
Parameters
Parameter | Type | Mandatory | Notes | Pulse Version |
---|---|---|---|---|
runData | Variant | Optionally pass in a value or an object that will be exposed to Tasks, and some events, as the "runData" parameter. See Notes section below for additional information. Defaults to an empty object. | 0.1 | |
ignoreQueueSize | Boolean | If set to Defaults to | 0.1 |
Return value
Value | Type | Notes | Process Version | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
<instance> | Process Instance | The process instance is returned, so you can chain more instance methods, eg:
| 0.1 |
Notes
Each time a new instance run is started, the runData parameter is pushed in to a stack so that each run can be given its applicable runData. When the current run finishes, its runData is removed from the stack and the next run starts.
If a trigger has more than PROCESS_ Process.MAX_QUEUE runs in its queue, warning messages will be shown to indicate that developer attention is likely required (basically the process instance is becoming overloaded). If you expect to be issuing multiple runs on an instance in short succession, for example because a game event is triggering it, set the ignoreQueueSize parameter to true
to avoid such warnings.
Div | ||
---|---|---|
| ||
AvailabilityRequires:
|