core
core copied to clipboard
Optional mutex pointer for all larger-scale giv Views
Problem: if you update a Slice, Map, etc while a SliceView, MapView, TableView etc is also updating its representation of it, then you'll get crashes. This also applies to emergent etable.Tables
It is not possible to protect against this in a fully generic way (even with a specific type like etable, which can be accessed in many different ways and it would be horrible to protect all of them).
But if the user knows when they are specifically updating something that is also likely to be viewed, they could create and use a mutex to wrap those updates, and give a pointer to it to the view, and that would provide a way to deal with the problem in specific cases.
This will deal with #299
i'm not going to finish this for the 1.0 release, btw -- too many other things to do at this point! will finish later.
the separate update / render logic fixes this issue -- you are in charge of exactly when the update happens, fully sync and immediate -- later render is based on widget updates but doesn't go back to original source struct at all, so should be very safe.