Replies: 1 comment
-
For future reference, I believe that this was answered in the #fyne channel in Gophers slack and hence the close. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I am new to fyne, and I have read about the "updating content" section of the doc. Even though I could understand threading is being taken care of by fyne for scenarios like 'SetText` from another go routine, I am still not clear how list widget works with update from other go routines. For the example here https://developer.fyne.io/collection/list
If I update the data slice from another go routine constantly (i.e. writing), how could fyne maintain the thread safety of reading (displaying the widget) and writing data at the same time?
Thanks.
edit: Got answered in the #fyne channel. Better approach is to use the binding data for the thread safety. To use the external data, we have to manage locking the access, and check the index whether in range in the UpdateItem callback.
Beta Was this translation helpful? Give feedback.
All reactions