### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- model_thread »

# signal_slot_model_thread

Created on Sep 9, 2009

@author: tw55413

class `camelot.view.model_thread.signal_slot_model_thread.``SignalSlotModelThread`(setup_thread=<function setup_model at 0x9f2f87c>)

  A model thread implementation that uses signals and slots to communicate between the model thread and the gui thread

  there is no explicit model thread verification on these methods, since this model thread might not be THE model thread.

  `busy`(*args, **kwargs)

    Return True or False indicating wether either the model or the gui thread is doing something

  `pop`(*args, **kwargs)

    Pop a task from the queue, return None if the queue is empty

  `wait_on_work`(*args, **kwargs)

    Wait for all work to be finished, this function should only be used to do unit testing and such, since it will block the calling thread until all work is done

class `camelot.view.model_thread.signal_slot_model_thread.``TaskHandler`(queue)

  A task handler is an object that handles tasks that appear in a queue, when its handle_task method is called, it will sequentially handle all tasks that are in the queue.

  `busy`()

    Return True/False:
    | indicating if this task handler is busy

  `handle_task`()

    Handle all tasks that are in the queue

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- model_thread »

Comments
blog comments powered by Disqus