Closed lawrencegripper closed 3 years ago
I want to test it a bit more, if there is no problem with the goroutines running in the background. I would assume most of them will get blocked (like pollEvent
and loaderTick
) because the channels are unbuffered and the MainLoop
is blocked by the user event which runs other terminal program (like vi
). At least that's how I understand the usage here.
Another thing is, as I mentioned in #82, if it wouldn't be better to name those functions something like Suspend
and Resume
, to make it more obvious what they are designed for? But that's just the naming anyway :)
Sounds good to me, I agree on renamed the methods - pushed this up now. From my testing so far with azbrowse this works as expected (granted relatively limited)
Done some more testing and this all plays nicely for me and feels good to go, any tweaks needed or feedback?
Looks good. I did some testing on my app too and the change seems quite well behaved (also the code is much more simple) :) I'm using UpdateAsync
though, so it gets blocked (which is good).
If somebody is using Update
in their goroutines, the amount of spawned go routines could be increased, but I guess people have to deal with it on their own (and don't do Update
when they call Suspend
).
@mjarkk what do you think about this? Could be merged?
As mentioned in #83 this change enables azbrowse to load another terminal app then, once it has closed, re-enable the gocui.
Our calls to this look like this: