AllenDang / cimgui-go

Auto generated Go wrapper for Dear ImGui via cimgui
MIT License
298 stars 43 forks source link

Add OS thread locking in example code #278

Closed tenten8401 closed 2 months ago

tenten8401 commented 2 months ago

If you're using this example code as the base for a project and start running other code in goroutines and getting the scheduler involved, the C bindings do not like this very much and the GUI will completely lock up when the scheduler automatically switches the imgui calls between OS threads.

tinhajj commented 2 months ago

I was noticing this today, struggling to figure out why my gui was locking up too. I tried the oslock like you suggested and that worked for me as well. Thanks