I am using darktile for an internal project and stumbled upon a few data races. In essence, we are processing input via io.Copy->Terminal.Write->handleInput concurrently without synchronizing with the main rendering loop (GUI.Update->...->g.terminal.GetActiveBuffer).
I haven't done any analysis on contention but at first glance we might be adding some, since we are blocking on internal calls to WriteToPty etc. This solution was enough for my purposes so feel free to close PR if you think a more sophisticated approach is required.
I am using darktile for an internal project and stumbled upon a few data races. In essence, we are processing input via
io.Copy->Terminal.Write->handleInput
concurrently without synchronizing with the main rendering loop (GUI.Update->...->g.terminal.GetActiveBuffer
).I haven't done any analysis on contention but at first glance we might be adding some, since we are blocking on internal calls to
WriteToPty
etc. This solution was enough for my purposes so feel free to close PR if you think a more sophisticated approach is required.