1
0
mirror of https://github.com/gdamore/tcell.git synced 2025-04-27 13:48:50 +08:00

4 Commits

Author SHA1 Message Date
Tim Culverhouse
dbd182b6da widgets: lock access to WidgetWatchers internal map
The WidgetWatchers struct is designed to be embedded into custom widgets
in order to satisfy the WidgetWatcher interface. The implementation uses
an internal map for storing EventHandlers, but does not lock access to
the access of the map within each method. A race condition can occur if
Watch, Unwatch, or any event is Posted from separate goroutines.

Lock access to the internal map. When posting an event, create a deep
copy of the map for iterating. This prevents potential deadlocks from a
widget calling Unwatch while handling an event.
2022-10-16 22:31:04 -07:00
Garrett D'Amore
8a32d2b0c8 Version 2.0 work in progress. 2020-08-25 16:20:58 -07:00
Garrett D'Amore
b727b9f424 fixes #74 Make Application an object/class
fixes #73 Views package has many go lint issues
2015-11-04 14:26:57 -08:00
Garrett D'Amore
e7d14c2863 fixes #62 windows console may have FIFO hang
fixes #63 Initial views API integration
2015-10-30 12:18:06 -07:00