typed_isolate 6.0.0 typed_isolate: ^6.0.0 copied to clipboard
Easier and type-safe isolate usage with parent and child isolates
6.0.0 #
- Breaking change: Made
IsolateChild.onSpawn()
aFuture<void>
. Messages will not be handled andonData
will not be called until afteronSpawn()
finishes. If you need to run a lot of code on spawn, split it into two parts where one must be run before handling new messages, and one that can be handled later, then useawait
for the first andunawaited
for the second.
5.0.0 #
- Added
IsolateChild.stream
- Added
IsolateParent.stream
- Added
IsolateParent.hasChild()
- Added
IsolateParent.killChild()
- Updated docs, example, and README
- Fixed bug where
IsolateParent.dispose()
was not using the givenpriority
parameter.
Breaking changes
IsolateParent
is no longer meant to be subclassed. Simply create one and callinit
on it as usual.IsolateParent.send()
has been renamed tosendToChild()
, andIsolateChild.send()
has bene renamed tosendToParent()
- Removed
IsolateParent.onData
. Subscribe toIsolateParent.stream
instead - Removed
IsolateChild.init
. OverrideIsolateChild.onSpawn
instead.
4.0.0 #
- Breaking: Merged
IsolateParent.stopListening()
andIsolateParent.killAll()
intoIsolateParent.dispose()
- New warning: Annotated
IsolateParent.init()
with@mustCallSuper
3.0.0 #
- Renamed
IsolateParent.stop()
toIsolateParent.stopListening()
and addedIsolateParent.killAll()
2.0.1 #
- Minor formatting fixes
2.0.0 #
Changed signature of IsolateParent.onData
and IsolateParent.send
to contain the IsolateChild.id
1.0.1 #
- Updated example with correct imports and lints.
1.0.0 #
- Initial version.