EsAsynchronousSupport
Description
This application provides support for asynchronous programming with Futures. Futures are objects that represent a computation whose return value might not be available yet. They are often used for potentially lengthy computations such as I/O and interaction with users.
User Objects: @see class comments for more details
EsFuture: An object representing a delayed computation.
EsPromise: A way to produce <EsFuture> objects and to complete them later with a value or error.
Features
(@see @EsFuture-Interface category)
Turn any synchronous activity into an asynchronous activity (i.e. EsFuture on: [self doSyncActivity])
(Chainable) Create async call chains (i.e ((future then: [:result1 | self doSomething(result1)]) then: [:result2 | ...))
@see <EsFuture> class comments for more details
Promises:
Objects that provide a future and is used to programmatically complete the future.
Can be used to convert callback style to async style
@see <EsPromise> class comments for more details
Async Exception Handling
Async equivalents of #on:do: and ensure: are provided
Can signal arbitrary objects, in addition to other exceptions
All unhandled exceptions make their way to the <EsAsyncUncaughtErrorHandler> (logged to tty console by default)
Class Methods
None
Instance Methods
None
Last modified date: 04/21/2022