- Added
initialCheck
parameter towaitForEmpty()
, which causes the function to return immediately if the queue is already empty.
Secretary.waitForEmpty()
: wait for the task list to be empty. Useful for cases where a fixed number of tasks is added at once, and you just want to wait for all of them to finish.- Recurring tasks now emit a
RecurringTaskFinishedEvent
when they finish. - Upgraded SDK constraint to Dart 3.
- Removed
firstWhereOrNull
extension in favour of Dart 3firstOrNull
.
Secretary.link()
: connects a Secretary to another, so that whenever a task successfully completes in the first, one is added to the second.
- What used to be
SecretaryState
is nowSecretaryStatus
,Secretary.state
is nowSecretary.status
, etc. - Added
SecretaryState
(Secretary.state
andSecretary.stateStream
), which contains information about the queue and recurring tasks.
- Tests for
waitForResult()
. - More
Validator
helper functions, and match validators now returnInvalidValueError
.
Secretary.waitForResult()
: use this to wait for a result for a specific event.
- Added concurrency:
Secretary.maxConcurrentTasks
.
- Added
StopPolicy.finishRecurring
. - Stop policy tests.
- Added
onComplete
andonError
callbacks to recurring tasks.
- Recurring tasks.
TaskOverrides
data class instead of tons of parameters inSecretary.add()
.RetryPolicy
is nowQueuePolicy
.
- More tests.
- More documentation.
- More Validator and RetryTest helpers.
- More documentation.
failureStream
andretryStream
helpers.- Fixed a bug with cleaning up failed tasks.
- Initial release.