IsGUIThread -- What does it do?

1.1k Views Asked by At

I've been unable to figure out what IsGUIThread really does... I've even looked at the ReactOS source code, but I can't figure it out.

Any ideas why you might call it?

1

There are 1 best solutions below

9
On BEST ANSWER

IsGUIThread tells you if the current thread is a GUI thread - that is a thread that is running a message loop.

What it actually does is check if the current thread has GUI thread info (see GetGUIThreadInfo in MSDN.

I have never used this function but one possible use I would guess is to allow code to defer slow tasks to a worker thread if the current thread is a GUI thread.