Forum > macOS / Mac OS X

ShowMessage() runs in a different thread?

<< < (3/3)

MarkMLl:
Sorry about yelling at you earlier... or maybe you didn't see that bit :-)

I tend to be pretty paranoid with assertions checking that methods are- or aren't- running in the GUI thread. In a number of cases I also try to write such that a method/function/etc. can be called in either the GUI or a background thread... I can thoroughly recommend those precautions.

MarkMLl

Thaddy:
Mark, PostMessage is async, sendmessage is synced.
The former is suitable for thread communication, the latter less so, since it causes blocking.

MarkMLl:

--- Quote from: Thaddy on December 28, 2020, 10:36:04 pm ---Mark, PostMessage is async, sendmessage is synced.
The former is suitable for thread communication, the latter less so, since it causes blocking.

--- End quote ---

Yes, I worked through them in detail a few months ago and tightened up the wiki page a little bit (I'd had some "interesting" experiences due to spurious APMs). But I was trying to get stuff typed rapidly in the messages above to stop OP flailing so was sticking to what I was confident I could recall correctly.

Mark

Navigation

[0] Message Index

[*] Previous page

Go to full version