def spin_thread(self, interval=<NUM_LIT:1>):
if self._spin_thread is not None:<EOL><INDENT>self.stop_spin_thread()<EOL><DEDENT>self._stop_spinning.clear()<EOL>self._spin_thread = Thread(target=self._spin_every, args=(interval,))<EOL>self._spin_thread.daemon = True<EOL>self._spin_thread.start()<EOL>
call Client.spin() in a background thread on some regular interval

        This helps ensure that messages don't pile up too much in the zmq queue
        while you are working on other things, or just leaving an idle terminal.

        It also helps limit potential padding of the `received` timestamp
        on AsyncResult objects, used for timings.

        Parameters
        ----------

        interval : float, optional
            The interval on which to spin the client in the background thread
            (simply passed to time.sleep).

        Notes
        -----

        For precision timing, you may want to use this method to put a bound
        on the jitter (in seconds) in `received` timestamps used
        in AsyncResult.wall_time.