# Threading Backend

class pypdevs.realtime.threadingBackend.ThreadingBackend(subsystem, args)

  Wrapper around the actual threading backend. It will also handle interrupts and the passing of them to the calling thread.

  __init__(subsystem, args)

    Constructor

    Parameters

      - subsystem – string specifying the subsystem to use: python, tkinter or loop

      - args – all additional arguments that should be passed to the subsystem’s constructor (must be a list)

  getInterrupt()

    Return the value of the interrupt and clear it internally.

    Returns

      the interrupt

  interrupt(value)

    Interrupt a running wait call.

    Parameters

      value – the value that interrupts

  setInterrupt(value)

    Sets the value of the interrupt. This should not be used manually and is only required to prevent the asynchronous combo generator from making interrrupt() calls.

    Parameters

      value – value with which the interrupt variable should be set

  step()

    Perform a step in the backend; only supported for the game loop backend.

  wait(time, func)

    A non-blocking call, which will call the func parameter after time seconds. It will use the provided backend to do this.

    Parameters

      - time – time to wait in seconds, a float is possible

      - func – the function to call after the time has passed