runtime.promise - Palamecia/mint GitHub Wiki
Module runtime.promise
Description
load runtime.promise
This module provides the Runtime.Promise helper used to track the state of a coroutine scheduled by the runtime scheduler.
Packages
Classes
Runtime.Promise
This class represents the state of an asynchronous operation.
Public members
| Modifiers | Member | Description |
|---|---|---|
const |
!= | Returns false if other is equal to this promise; otherwise returns true. |
const |
() | Takes the associated operation's result and returns it. If the result is not ... |
const |
== | Returns true if other is equal to this promise; otherwise returns false. |
const |
get | Takes the associated operation's result and returns it. If the result is not ... |
const |
new | Creates a new promise for the result of the coroutine operation. |
| start | Starts the associated operation. |
Private members
| Modifiers | Member | Description |
|---|---|---|
final |
coroutine | Internal associated coroutine. |
final |
result | Internal result. |
final |
scheduler | Internal associated scheduler. |
Descriptions
Runtime.Promise.!=
def (const self, const other)
Returns false if other is equal to this promise; otherwise returns true.
Runtime.Promise.()
def (self)
Takes the associated operation's result and returns it. If the result is not yet available, the method
returns none.
Runtime.Promise.==
def (const self, const other)
Returns true if other is equal to this promise; otherwise returns false.
Runtime.Promise.coroutine
null
Internal associated coroutine.
Runtime.Promise.get
def (self)
Takes the associated operation's result and returns it. If the result is not yet available, the method
returns none.
Runtime.Promise.new
def (self, scheduler, coroutine)
Creates a new promise for the result of the coroutine operation.
Runtime.Promise.result
none
Internal result.
Runtime.Promise.scheduler
null
Internal associated scheduler.
Runtime.Promise.start
def (self)
Starts the associated operation.