         try self.selector.close()
     }
 
+    /// Returns `true` if the `SelectableChannel` is still open and so we should continue handling IO / tasks for it. Otherwise it returns `false` and will deregister the `SelectableChannel`
+    /// from this `SelectableEventLoop`.
     private func handleEvents<C: SelectableChannel>(_ channel: C) -> Bool {
         if channel.open {
             return true

    let iovecs: UnsafeMutableBufferPointer<IOVector>
    let storageRefs: UnsafeMutableBufferPointer<Unmanaged<AnyObject>>
    
    public init(thread: pthread_t) throws {
        self.selector = try NIO.Selector()
        self.thread = thread

    }
}

/// An `EventLoopGroup` which will create multiple `EventLoop`s, each tied to its own `Thread`.
final public class MultiThreadedEventLoopGroup : EventLoopGroup {
    
    private let index = Atomic<Int>(value: 0)
