diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-12-06 02:44:57 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-12-06 02:45:26 +0100 |
| commit | 8c631b0c25c8de616afa2fd89378299c9d9a1439 (patch) | |
| tree | 4f37d5612f17bc13a0a3d1b71019711430eab0c4 /packbuilder.go | |
| parent | 0ec2f4665913a37df6f4d5704ea3a69bae2eb8b3 (diff) | |
Add missing thread locking
Diffstat (limited to 'packbuilder.go')
| -rw-r--r-- | packbuilder.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packbuilder.go b/packbuilder.go index 666f5c4..24d2f6d 100644 --- a/packbuilder.go +++ b/packbuilder.go @@ -132,6 +132,9 @@ func (pb *Packbuilder) ForEach(callback PackbuilderForeachCallback) error { err: nil, } + runtime.LockOSThread() + defer runtime.UnlockOSThread() + err := C._go_git_packbuilder_foreach(pb.ptr, unsafe.Pointer(&data)) if err == C.GIT_EUSER { return data.err |
