While I agree that the comment of FunctionDispatcher claims that it calls the function in the thread that it was created in, the situation isn't that clear cut.
From the Qt docs at
http://doc.qt.nokia.com/latest/threa...across-threads
Queued Connection The slot is invoked when control returns to the event loop of the receiver's thread. The slot is executed in the receiver's thread.
That, in this case, means the thread the FD object was created in as the comment claims. However, if the thread does not have an event loop (which is almost always the case for all non GUI threads in calibre), I'm guessing it is actually called in the GUI thread.
Perhaps a good solution is to raise an exception in FD.__init__ if the current thread is not the GUI thread.