summaryrefslogtreecommitdiff
path: root/redo/table_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/table_unix.go')
-rw-r--r--redo/table_unix.go18
1 files changed, 7 insertions, 11 deletions
diff --git a/redo/table_unix.go b/redo/table_unix.go
index d618663..611beae 100644
--- a/redo/table_unix.go
+++ b/redo/table_unix.go
@@ -58,17 +58,13 @@ func (t *table) Lock() {
func (t *table) Unlock() {
t.unlock()
- // there's a possibility that user actions can happen at this point, before the view is updated
- // alas, this is something we have to deal with, because Unlock() can be called from any thread
- go func() {
- Do(func() {
- t.RLock()
- defer t.RUnlock()
- d := reflect.Indirect(reflect.ValueOf(t.data))
- new := C.gint(d.Len())
- C.tableUpdate(t.model, t.old, new)
- })
- }()
+ // TODO RACE CONDITION HERE
+ // not sure about this one...
+ t.RLock()
+ defer t.RUnlock()
+ d := reflect.Indirect(reflect.ValueOf(t.data))
+ new := C.gint(d.Len())
+ C.tableUpdate(t.model, t.old, new)
}
//export goTableModel_get_n_columns