Ok to call SwapBuffers in separate rendering thread?

Hi,

I’ve just spent hours trying to confirm if it’s ok or not to call SwapBuffers in a separate rendering thread under Windows/WGL.

My scenario:

Main Thread:
Create UI and GL window with an OpenGL context etc.
Create new render thread
Run UI event loop

Render Thread:
Make OpenGL context current in this thread
Loop:
Render scene using OpenGL
SwapBuffers(HDC)

My understanding is that, in general, GDI device handles (HDC) are not thread safe and must only be accessed from the thread that created the window. But on the other hand, calling SwapBuffers with the device handle as an argument in a separate OpenGL rendering thread without any particular synchronization precautions seems to be a common thing to do, including by popular OpenGL support libraries such as GLFW.

Is anyone able to definitively confirm that calling SwapBuffers on a device handle in a separate OpenGL Rendering thread is ok? (In general, or under Windows WGL specifically).

Thanks, Lars