diff options
| author | Quinn Slack <[email protected]> | 2014-11-18 04:57:26 -0800 |
|---|---|---|
| committer | Quinn Slack <[email protected]> | 2014-11-18 04:57:26 -0800 |
| commit | 8b39eb795340dff00f16f93d6e9d154fabc98b14 (patch) | |
| tree | 8aa5d1dda8ad0511f272d77890dd1dca35838f72 | |
| parent | 609a9a3cdf9e99d7d11e271a8838f9db6b40573a (diff) | |
lock OS thread when MakeGitError might be called
| -rw-r--r-- | blame.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -16,6 +16,9 @@ type BlameOptions struct { } func DefaultBlameOptions() (BlameOptions, error) { + runtime.LockOSThread() + defer runtime.UnlockOSThread() + opts := C.git_blame_options{} ecode := C.git_blame_init_options(&opts, C.GIT_BLAME_OPTIONS_VERSION) if ecode < 0 { @@ -63,6 +66,9 @@ func (v *Repository) BlameFile(path string, opts *BlameOptions) (*Blame, error) } } + runtime.LockOSThread() + defer runtime.UnlockOSThread() + ecode := C.git_blame_file(&blamePtr, v.ptr, C.CString(path), copts) if ecode < 0 { return nil, MakeGitError(ecode) |
