This method is invoked by the close method in order
to perform the actual work of closing the channel. This method is only
invoked if the channel has not yet been closed, and it is never invoked
more than once.

An implementation of this method must arrange for any other thread
that is blocked in an I/O operation upon this channel to return
immediately, either by throwing an exception or by returning normally.