Add Feature query support & panic if libgit2 is not thread-aware #354

Merged
carlosmn merged 2 commits from cmn/panic-threading into next 2016-10-31 18:16:27 -05:00
carlosmn commented 2016-10-31 15:19:56 -05:00 (Migrated from github.com)

We ask libgit2 whether it's thread-safe and we panic if it's not. Go's runtime's interaction with C code is inherently multi-threaded so we're bound to crash anyway. Do it at the start with a message that describes the issue.

I'm not sure how to do automated testing for this without incurring twice the cost of building libgit2, but It Works On My Machine.

This fixes #329

We ask libgit2 whether it's thread-safe and we panic if it's not. Go's runtime's interaction with C code is inherently multi-threaded so we're bound to crash anyway. Do it at the start with a message that describes the issue. I'm not sure how to do automated testing for this without incurring twice the cost of building libgit2, but It Works On My Machine. This fixes #329
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#354
No description provided.