def add_callback(self, fn, *args, **kwargs):
    'Pass a function to be called when IO is complete.'
    if _debug:
        IOCB._debug('add_callback(%d) %r %r %r', self.ioID, fn, args, kwargs)
    self.ioCallback.append((fn, args, kwargs))
    if self.ioComplete.isSet():
        self.trigger()
Pass a function to be called when IO is complete.
def add_callback(self, fn, *args, **kwargs):
    
    if _debug:
        IOCB._debug('add_callback(%d) %r %r %r', self.ioID, fn, args, kwargs)
    self.ioCallback.append((fn, args, kwargs))
    if self.ioComplete.isSet():
        self.trigger()