No, I meant why isnt the following logic sufficient? 
```
while (events.size < maxBatchSize) {
     val eventOpt = Option(getChannel.take())     
      // do whatever you do when eventOpt is not None
      if (eventOpt.isEmpty) {
           if (!events.isEmpty) {
               Thread.sleep(500)
           } else {
                loop.break()
           }
      }
}
```