class IOStream
Stream of external side-effects.
Unlike other Streams, this is not updated/set by an Op instace, but is continuously polled for changes by the runtime and may mark itself as dirty at any point in time. All runtime execution happens due to IOStream updates, which ripple through the Result tree.
index
iostream interface
-
IOStream(type)
– construct a new IOStream. -
iostream:fork()
– create a mutable copy of this stream. -
iostream:poll()
– poll for changes. -
iostream:dirty()
– check whether this adapter requires processing.
details
iostream interface
-
– construct a new IOStream.
Must prepare the instance for dirty to be called. The super-constructor should be called to set Stream.type.
parameters:
- the typename of this stream.
-
– create a mutable copy of this stream.
Used to wrap insulate eval-cycles from each other.
returns:
- (IOStream)
-
– poll for changes.
Called every frame by the main event loop to update internal state.
-
– check whether this adapter requires processing.
Must return a boolean indicating whether Ops that refer to this instance via Input.hot should be notified (via Op:tick). May be called multiple times. May be called before poll on the first frame after construction.
If this is not overrided, the EventStream interface can be used, see EventStream.add, EventStream.unwrap, and EventStream.dirty.
returns:
- (bool): whether processing is required