Skip to content

Move Zyn GUI to main thread#4065

Merged
tresf merged 1 commit into
LMMS:stable-1.2from
tresf:zynmac
Dec 22, 2017
Merged

Move Zyn GUI to main thread#4065
tresf merged 1 commit into
LMMS:stable-1.2from
tresf:zynmac

Conversation

@tresf

@tresf tresf commented Dec 21, 2017

Copy link
Copy Markdown
Member

Closes #703

We'll need some solid testing on Windows and Linux to make sure no regressions are caused as a result of this change.

@tresf tresf added this to the 1.2.0 milestone Dec 21, 2017
@PhysSong

Copy link
Copy Markdown
Member

As the author of this patch, I'd like to say that it should be fine on every platforms. The reasons are:

  1. It is safe to execute the message loop in any thread since it doesn't call UI functions or thread-dependent functions(as far as I know).
  2. It is normal to run UI loop in main thread. It's safe, too.
  3. I've changed the synchronization logic a little bit. Now the message processing thread always finishes before the GUI loop. So there should'n be any threading issues.

Anyway, testing is always good. 👍

@tresf

tresf commented Dec 22, 2017

Copy link
Copy Markdown
Member Author

@tresf

tresf commented Dec 22, 2017

Copy link
Copy Markdown
Member Author

We've extensively tested this on Mac, Linux and Windows.

Here's some evidence that the Zyn UI can remain open and stable with this PR despite several preset changes. Worth noting... I was able to get it to crash twice, but I cannot reproduce now despite how hard I try. When it crashed, the stack trace did not point to the UX, so @PhysSong suspects I had found an existing edge case that already exists.

untitled

@tresf
tresf merged commit a3d72de into LMMS:stable-1.2 Dec 22, 2017
@tresf
tresf deleted the zynmac branch December 22, 2017 20:29
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
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