def _not_reentrant(func):
        """Decorator that prevents callbacks from calling into methods that are
        not reentrant
        """
        def wrap(self, *args, **kws):
            if self._callback_lock and self._callback_lock.in_callback:
                m = "Connection %s cannot be invoked from a callback!" % func
                raise RuntimeError(m)
            return func(self, *args, **kws)
        return wrap
def _not_reentrant(func):
        
        def wrap(self, *args, **kws):
            if self._callback_lock and self._callback_lock.in_callback:
                m = "Connection %s cannot be invoked from a callback!" % func
                raise RuntimeError(m)
            return func(self, *args, **kws)
        return wrap
def _not_reentrant ( func ) : def wrap ( self , * args , * * kws ) : if self . _callback_lock and self . _callback_lock . in_callback : m = "Connection %s cannot be invoked from a callback!" % func raise RuntimeError ( m ) return func ( self , * args , * * kws ) return wrap
Decorator that prevents callbacks from calling into methods that are
        not reentrant
Decorator that prevents callbacks from calling into methods that are not reentrant