diff options
Diffstat (limited to 'redo/table_windows.go')
| -rw-r--r-- | redo/table_windows.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/redo/table_windows.go b/redo/table_windows.go index be9427e..576ae4a 100644 --- a/redo/table_windows.go +++ b/redo/table_windows.go @@ -38,15 +38,11 @@ func finishNewTable(b *tablebase, ty reflect.Type) Table { 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() - C.tableUpdate(t._hwnd, C.int(reflect.Indirect(reflect.ValueOf(t.data)).Len())) - }) - }() + // TODO RACE CONDITION HERE + // I think there's a way to set the item count without causing a refetch of data that works around this... + t.RLock() + defer t.RUnlock() + C.tableUpdate(t._hwnd, C.int(reflect.Indirect(reflect.ValueOf(t.data)).Len())) } //export tableGetCellText |
