* Forks a fiber that will display a warning message if a test is advancing * the `TestClock` but a fiber is not suspending.
()
| 353 | * the `TestClock` but a fiber is not suspending. |
| 354 | */ |
| 355 | suspendedWarningStart(): Effect.Effect<void> { |
| 356 | return synchronized.updateSomeEffect(this.suspendedWarningState, (suspendedWarningData) => { |
| 357 | if (SuspendedWarningData.isStart(suspendedWarningData)) { |
| 358 | return Option.some( |
| 359 | pipe( |
| 360 | this.live.provide( |
| 361 | pipe( |
| 362 | effect.logWarning(suspendedWarning), |
| 363 | core.zipRight(ref.set(this.suspendedWarningState, SuspendedWarningData.done)), |
| 364 | effect.delay(Duration.seconds(5)) |
| 365 | ) |
| 366 | ), |
| 367 | core.interruptible, |
| 368 | fiberRuntime.fork, |
| 369 | core.map((fiber) => SuspendedWarningData.pending(fiber)) |
| 370 | ) |
| 371 | ) |
| 372 | } |
| 373 | return Option.none() |
| 374 | }) |
| 375 | } |
| 376 | /** |
| 377 | * Cancels the warning message that is displayed if a test is advancing the |
| 378 | * `TestClock` but a fiber is not suspending. |
no test coverage detected