summaryrefslogtreecommitdiff
path: root/packbuilder.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2014-12-06 02:44:57 +0100
committerCarlos Martín Nieto <[email protected]>2014-12-06 02:45:26 +0100
commit8c631b0c25c8de616afa2fd89378299c9d9a1439 (patch)
tree4f37d5612f17bc13a0a3d1b71019711430eab0c4 /packbuilder.go
parent0ec2f4665913a37df6f4d5704ea3a69bae2eb8b3 (diff)
Add missing thread locking
Diffstat (limited to 'packbuilder.go')
-rw-r--r--packbuilder.go3
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