         super.init()
         name = "Delay \(delay)"
         addDidCancelBlockObserver { procedure, _ in
-            procedure.timer?.cancel()
+            procedure.stateLock.withCriticalScope {
+                procedure._timer?.cancel()
+            }
         }
     }
 

     */
    public override func execute() {
        switch delay.interval {
        case (let interval) where interval > 0.0 && !isCancelled:
            timer = DispatchSource.makeTimerSource(flags: [], queue: DispatchQueue.default)
            timer?.setEventHandler { [weak self] in
                guard let strongSelf = self else { return }
                if !strongSelf.isCancelled { strongSelf.finish() }
            }
            timer?.scheduleOneshot(deadline: .now() + interval, leeway: leeway)
            timer?.resume()
        default:
            finish()
        }


    private let delay: Delay
    private let leeway: DispatchTimeInterval
    private var _timer: DispatchSourceTimer? = nil
    private let stateLock = NSLock()

    internal init(delay: Delay, leeway: DispatchTimeInterval = .milliseconds(1)) {
        self.delay = delay
