     }
 
     executor.execute {
-      self._locking.lock()
+      if !avoidLocking {
+        self._locking.lock()
+      }
+
       var iterator = self._bufferedPeriodics.makeIterator()
       while let periodic_ = iterator.next() {
         block(.periodic(periodic_))
       }
-      self._locking.unlock()
+      if !avoidLocking {
+        self._locking.unlock()
+      }
     }
 
     return handler

  }
  var _finalValue: Fallible<FinalValue>?

  init(channel: Channel<PeriodicValue, FinalValue>, bufferedPeriodics: QueueImpl<PeriodicValue>) {
    _channel = channel
    _bufferedPeriodics = bufferedPeriodics
    _sema = DispatchSemaphore(value: bufferedPeriodics.count)
    super.init()
    _handler = channel.makeHandler(executor: .immediate) { [weak self] (value) in
      self?.handle(value)
    }
  }

  let _sema: DispatchSemaphore
  var _locking = makeLocking()
  let _bufferedPeriodics: QueueImpl<PeriodicValue>
  let _producer: Producer<PeriodicValue, FinalValue>
  var _handler: ChannelHandler<PeriodicValue, FinalValue>?
  override var finalValue: Fallible<FinalValue>? {
    _locking.lock()
