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 /remote.go | |
| parent | 0ec2f4665913a37df6f4d5704ea3a69bae2eb8b3 (diff) | |
Add missing thread locking
Diffstat (limited to 'remote.go')
| -rw-r--r-- | remote.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -249,6 +249,10 @@ func (r *Remote) Free() { func (repo *Repository) ListRemotes() ([]string, error) { var r C.git_strarray + + runtime.LockOSThread() + defer runtime.UnlockOSThread() + ecode := C.git_remote_list(&r, repo.ptr) if ecode < 0 { return nil, MakeGitError(ecode) @@ -573,6 +577,9 @@ func (o *Remote) Fetch(refspecs []string, sig *Signature, msg string) error { crefspecs.strings = makeCStringsFromStrings(refspecs) defer freeStrarray(&crefspecs) + runtime.LockOSThread() + defer runtime.UnlockOSThread() + ret := C.git_remote_fetch(o.ptr, &crefspecs, csig, cmsg) if ret < 0 { return MakeGitError(ret) |
