- Strandpipe ⇐
EventEmitter
The source of everything, control the flow of Async/Await and Promises function.
- Threadify
Consist a bunch of stacked function to utilize Synchronous-ify API
- Pipe()
The base of Strandpipe, consist of method for running and yielding synchronous jobs. Instance of Fibers/Coroutines.
- Future()
The base of Future methods and stuff
The source of everything, control the flow of Async/Await and Promises function.
Extends: EventEmitter
Author: Riichi_Rusdiana#6815
- Strandpipe ⇐
EventEmitter
- ~Strandpipe
- ~getPipeStream() ⇒
Pipe
- ~listen() ⇒
EventEmitter
- ~sync(next) ⇒
*
- ~streamSync(next) ⇒
*
- ~flow() ⇒
Array
- ~DesiredValue
Kind: inner class of Strandpipe
Start a Strandpipe class Consist of function that will be used a lots in the Pipestream
Header for debugging
Kind: instance property of Strandpipe
Strandpipe~getPipeStream() ⇒ Pipe
Get current running Pipestream. Will throw an error if no Pipestream is running.
Kind: inner method of Strandpipe
Add a listener.
Kind: inner method of Strandpipe
Returns: EventEmitter
- Listen to an event.
Run a Task to circulate Asynchronous value into Synchronous value.
Need a running Pipestream, and needs to be placed inside a Pipe
. Only for .then()
-able function.
Use streamSync()
for another type of callback.
Kind: inner method of Strandpipe
Returns: *
- The result of running task
Param | Type | Description |
---|---|---|
next | function |
A Function/Task that needs to be executed in order to get the Promised value |
If method .sync()
failed, use .streamSync()
.
This method is specifically used for function that needs to handle error.
They utilize function(err, value)
instead of .then()
.
If error is called from callback, it will automatically thrown as RangeError
Kind: inner method of Strandpipe
Param | Type | Description |
---|---|---|
next | function |
A Function/Task that needs to be executed in order to get the Promised value |
Specialized method to runs an Array of Tasks.
Returns Array of results.
Only for .then()
-able function.
Kind: inner method of Strandpipe
Type |
---|
Array.<function()> |
Kind: inner typedef of Strandpipe
Consist a bunch of stacked function to utilize Synchronous-ify API
Author: Riichi_Rusdiana#6815
- Threadify
- static
- .runner(next) ⇒
void
- .addListener(stream, next) ⇒
void
- .runner(next) ⇒
- inner
- ~sleep(ms) ⇒
void
- ~PipedFunction :
function
- ~sleep(ms) ⇒
- static
Start a runner.
Kind: static method of Threadify
Param | Type | Description |
---|---|---|
next | PipedFunction |
The code that will be executed inside a runner. |
Create a listener session for a runner.
Kind: static method of Threadify
Param | Type | Description |
---|---|---|
stream | Strandpipe |
You need to construct Strandpipe outside the Listener. |
next | function |
The code that will be executed inside a runner. |
Sleep for amount of time, before executing another process
Kind: inner method of Threadify
Param | Type | Description |
---|---|---|
ms | long |
Sleep time in Millis |
Kind: inner typedef of Threadify
Param | Type | Description |
---|---|---|
stream | Strandpipe |
Contains an instance of Strandpipe. The object Pipe is available via stream.pipe , and current pipe via stream.current . |
The base of Strandpipe, consist of method for running and yielding synchronous jobs. Instance of Fibers/Coroutines.
The base of Future methods and stuff
Kind: global typedef