mirror of
https://github.com/Hopiu/micro.git
synced 2026-05-22 05:11:53 +00:00
Fix race condition with events channel
This commit is contained in:
parent
5180634947
commit
ff24ad5fa8
1 changed files with 2 additions and 1 deletions
|
|
@ -211,9 +211,10 @@ func main() {
|
||||||
action.InitTabs(b)
|
action.InitTabs(b)
|
||||||
action.InitGlobals()
|
action.InitGlobals()
|
||||||
|
|
||||||
|
events = make(chan tcell.Event)
|
||||||
|
|
||||||
// Here is the event loop which runs in a separate thread
|
// Here is the event loop which runs in a separate thread
|
||||||
go func() {
|
go func() {
|
||||||
events = make(chan tcell.Event)
|
|
||||||
for {
|
for {
|
||||||
screen.Lock()
|
screen.Lock()
|
||||||
e := screen.Screen.PollEvent()
|
e := screen.Screen.PollEvent()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue