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 andonDatawill 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 useawaitfor the first andunawaitedfor 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 givenpriorityparameter.
Breaking changes
IsolateParentis no longer meant to be subclassed. Simply create one and calliniton it as usual.IsolateParent.send()has been renamed tosendToChild(), andIsolateChild.send()has bene renamed tosendToParent()- Removed
IsolateParent.onData. Subscribe toIsolateParent.streaminstead - Removed
IsolateChild.init. OverrideIsolateChild.onSpawninstead.
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.