TaskTimeout constructor

TaskTimeout({
  1. Duration? soft,
  2. required Duration hard,
  3. void onSoftTimeout(
    1. String executionId
    )?,
})

Implementation

TaskTimeout({
  this.soft,
  required this.hard,
  this.onSoftTimeout,
}) {
  if (soft != null && soft!.inMilliseconds >= hard.inMilliseconds) {
    throw ArgumentError('Hard timeout must be greater than soft timeout');
  }
}