mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #87] data race #66
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stephencheng on GitHub (Mar 26, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/87
Firstly, I'd say I am amazed by this project. It's great work there.
I was using termui and now entirely stuck with lots of effort dealing with the user interaction and found it is a dead end. And I am lucky to just land here to find a rescue.
I am not sure if a data race warning should be concerned at all as I just run it for the very basic example of a box, see below
I am considering using tview to deal with a timely refresh to get data for each tab(page), would it be even possible that I can use go route to deal with the backend task(to get some server end data) for each page in the background?
Thank you
@rivo commented on GitHub (Mar 26, 2018):
It looks like this race condition is happening in
tcell. You may want to open an issue there.Generally, you should be able to use goroutines in a
tviewproject. For example, if you write text to aTextView, you can do that asynchronously. And many of the functions inApplicationare thread-safe, too.If you're setting attributes of a primitive concurrently in multiple goroutines, e.g.
List.SetCurrentItem()orTable.SetCell(), you may have to synchronize those updates yourself. I guess I couldn't think of any real-life cases where you would need these functions to be thread-safe. But if you run into trouble with these in your project, let me know and I'll see if I can find a solution.@stephencheng commented on GitHub (Mar 28, 2018):
Thanks for replying
demos/tableto render correctly on Windows 10. #404demos/tableto render correctly on Windows 10. #404