Minor BREAKING CHANGES:
The file structure was reorganized, might cause some issues with imports
Added:
.initialized
accessor, to check if the thread is initialized, meaning alive and ready to emit and receive events
Fixed:
- Method
.untilAlive()
was skipping the future ahead of time, causing null check operators to throw an exception. Issue #1 - Strange behavior with
.compute()
and.computeWith()
methods, Dart wasn't handling theFuture
correctly and was getting stuck. Issue #2
Fixed:
- Thread
.emit()
data is optional, updated because ofevents_emitter
dependency
BREAKING CHANGES:
The Thread was partially refactored, and updated to use the new version of the
events_emitter
dependency. Although it's essentially the same, be aware the way events work might have changed, depending on your case.Changes:
[!]
Added:
pause
andresume
methods, to allow pausing and resuming the execution of the thread. This is the same as doingthread.isolate.pause()
.untilAlive
method, to wait until the thread is aliveThread.Compute
andThread.ComputeWith
methods, to create a temporary thread, execute a single task on it and return the resultlint
developer dependency
[!]
Changed:
- Thread property
eventHandler
is private - Thread property
receivePort
is internal - Renamed Thread property
emitter
toevents
, it's an easier term to understand - Renamed Thread property
running
toalive
, it's more accurate to what represents - Renamed ThreadComputeRequest property
callback
tocomputation
- Renamed file
schemas.dart
toothers.dart
- ChangeLog's format
- Improved documentation
Fixed:
thread.stop()
and thenthread.start()
would cause an exception for reusing the same ReceivePort- Basic lint errors
[!]
Removed:
keepEmitsWhileNotRunning
from Thread class, now it always preserves the emits
Fixed:
events_emitter
now returns a listener instead of a subscription
Changed:
events_emitter
andasync_signal
dependency versions to lastest
Added:
shields.io
badges in documentation Removed:flutter
from package dependency
Changed:
- Optional
eventEmitter
in Thread
Fixed:
- Wrong event
type
, in some cases
Changed:
- Renamed IsolatedThread class to Thread
Initial release: Thread