Skip to content

Conversation

@selmf
Copy link
Member

@selmf selmf commented May 25, 2018

Thread ping pong fix, second attempt. This one shouldn't cause gigantic memleaks like the first, but it does keep the comic objects in a dedicated thread during it's lifetime. The lifetime of the thread is always tied directly to the comic object. This roughly works like this:

  1. Comic object is deleted and sends out "destroyed" signal. The signal is sent to the thread's "quit" slot
  2. The thread finishes execution and sends out the "finished" signal. This is sent to the thread's "deleteLater" slot, which schedules the thread for deletion

selmf and others added 3 commits September 24, 2019 08:12
Stopped QThreads don't process events, so cleanup signals get lost.
Prevent this from happening by keeping the threads alive and the comic
inside the thread (as we already do in the viewer). Cleanup happens by
connecting the comic's destroyed() signal to the thread's quit() slot.
GitKraken has some serious issues when resolving conflicts
@luisangelsm luisangelsm merged commit b906bf9 into YACReader:develop Sep 24, 2019
@selmf selmf deleted the thread_ping_pong branch November 20, 2022 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants