mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
4f5baa9a51
Before this change, Window driver callbacks would all go through channels to be processed by Window.run. However, Window.run may call into the driver, which again may invoke a Window callback. These re-entrant calls have been a source of deadlocks and subtle errors, resulting in increasingly complex channel logic. This change eliminates the goroutine split between Window and the driver, allowing callbacks between Window and the driver without restrictions. The goroutine split between Window and the driver is historical and was meant to tame the complicated callback logic of drivers into a nice for-select loop. However, the complexity isn't worth the gain, and there is no concurrency concerns because there is always a 1:1 correspondance between a driver goroutine and its Window object. Fixes: https://todo.sr.ht/~eliasnaur/gio/329 Signed-off-by: Elias Naur <mail@eliasnaur.com>