Пример #1
0
    def join(self, timeout=None):
        """Ensure a Thread is stopped, drained and closed in a timely fashion.  The timeouts to respond to
        stop() and for the Thread to drain and close the socket are specified with the Constructor's
        latency= and drain= keywords; if these are reliably implemented, it is not necessary to
        provide a timeout here.

        """
        self.stop()
        ModbusConnectedRequestHandler.join(self, timeout=timeout)
Пример #2
0
    def join( self, timeout=None ):
        """Ensure a Thread is stopped, drained and closed in a timely fashion.  The timeouts to respond to
        stop() and for the Thread to drain and close the socket are specified with the Constructor's
        latency= and drain= keywords; if these are reliably implemented, it is not necessary to
        provide a timeout here.

        """
        self.stop()
        ModbusConnectedRequestHandler.join( self, timeout=timeout )
Пример #3
0
 def __init__(self, request, client, server):
     ModbusConnectedRequestHandler.__init__(self, request, client, server)
     if self.latency is not None:
         assert self.latency > 0, "Cannot specify a zero latency polling timeout"
Пример #4
0
 def __init__( self, request, client, server ):
     ModbusConnectedRequestHandler.__init__( self, request, client, server )
     if self.latency is not None:
         assert self.latency > 0, "Cannot specify a zero latency polling timeout"