NotifyChannel<T> class

Notifyオブジェクトを共有したChannel制御.

コンストラクタに指定した Notify がキャンセルされると、自動的にこのChannelも制御をキャンセル扱いとする. このクラスはNotifyの操作を行わないため、必要に応じて利用者が Notify.dispose をコールする.

Constructors

NotifyChannel(Notify notify)

Properties

hashCode int
The hash code for this object.
no setterinherited
isClosed bool
no setter
isEmpty bool
no setter
isNotEmpty bool
no setter
pendingItemCount int
受信待ちオブジェクト数.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
receive({String message = "Channel is closed."}) Future<T>
NotifyChannel.send が発行されるまで、受信まちを行う. コンストラクタに指定した Notify disposeされたとき、このメソッドは CancellationException を投げて終了する.
send(T value, {String message = 'Channel is closed.'}) → void
このChannelへ値を送信する.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited