#NEWLINE# def registerConnectCallback( self , callbackFun ) : #NEWLINE# #INDENT# assert ( pending is not None ) #NEWLINE# with self . channelConnectCallbackLock : #NEWLINE# #INDENT# assert ( self . channelConnectCallback is None ) #NEWLINE# self . channelConnectCallback = callbackFun #NEWLINE# pending = self . pendingChannelConnections #NEWLINE# self . pendingChannelConnections = None #NEWLINE# #UNINDENT# for channel in pending : #NEWLINE# #INDENT# self . channelConnectCallback ( pending )