Because some of the cleardown routines for this class take time to complete, I run them in a thread that is a member of that Card object.
That's probably not a very good idea.
I know this might not be the best idea, but since i have no control over the external library, which is slow, I need to use a thread to call the external routines.
What I have is the following:
QMainWindow, which has an event loop (Have called exec() is here)
|
|_ _ _ Hotswap QThread that uses waitformultiple objects to wait for events from an external library.
Exec() not called here, since my own thread processing is in run()
|
|_ _ _ When an event fires in the hotswap thread, a card object is created, and
after getting info about the card, the cleanup thread is run.
Note: The card object will still be alive after the cleanup thread has been executed.
So what I really need is a way to call delete on the cleanup thread, when the finished() signal fires, but i'm not sure how to do this in this instance.
Bookmarks