View Single Post
Old 11-10-2014, 08:49 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,407
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Look at devices/interface.py

Every single method in the Device object is called in the device thread, with a few exceptions, which are documented (search for thread in that file).

The calibre user interface is in the GUI thread, device operations are in the device thread, so as not to block the UI. The vast majority of device driver code is all executed in the device thread and calibre automatically takes care of dispatching events to the UI thread as appropriate. The few exceptions are documented in interface.py
kovidgoyal is offline   Reply With Quote