diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-11 19:38:21 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-11 19:38:21 -0400 |
| commit | 166eaeb7db48232cfac460d8d6d8d8476e7a8664 (patch) | |
| tree | aa9c3afc6574d0fa7fccd9216ad50e70224dcf6e /redo/table_darwin.go | |
| parent | 67adbd43a1bbf35fdc3963b34ae5631758006fee (diff) | |
Revert "Revert "Settled race condition TODOs across all platforms... as an unfortunate case :(""
Put this back on master so we can debug.
This reverts commit 67adbd43a1bbf35fdc3963b34ae5631758006fee.
Diffstat (limited to 'redo/table_darwin.go')
| -rw-r--r-- | redo/table_darwin.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/redo/table_darwin.go b/redo/table_darwin.go index c80dbdc..95344c1 100644 --- a/redo/table_darwin.go +++ b/redo/table_darwin.go @@ -36,11 +36,15 @@ func finishNewTable(b *tablebase, ty reflect.Type) Table { func (t *table) Unlock() { t.unlock() - // TODO RACE CONDITION HERE - // not sure about this one... - t.RLock() - defer t.RUnlock() - C.tableUpdate(t._id) + // 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._id) + }) + }() } //export goTableDataSource_getValue |
