aiongg / khiin

Khí-ín Tâi-gí phah jī hoat 起引台語拍字法
MIT License
4 stars 3 forks source link

Make engine processing asynchronous #6

Open aiongg opened 1 year ago

aiongg commented 1 year ago

Communication between the Windows client app and the engine is currently synchronous. This is particularly problematic for longer database operations like initialization, which causes a very short hiccup that blocks the UI thread (it used to be half a second and is now <100ms). The client/engine communication should happen asynchronously to prevent any UI blocking.

This is the method in the Windows client application that calls the engine library and needs to be revised: https://github.com/aiongg/khiin/blob/master/windows/tip/EngineController.cpp#L187-L200