| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:420ebc62-d451-49d4-8712-ef0c54d1797a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8D76:FEED7:1FA5D45:2C12F78:6A5F4633 |
| html-safe-nonce | af7f8e7ca0f33fca4305421703cb10bea29759589b0cb0c0a140cc24ec7d7061 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDc2OkZFRUQ3OjFGQTVENDU6MkMxMkY3ODo2QTVGNDYzMyIsInZpc2l0b3JfaWQiOiIyMzQxMTUxMzQ0NDMzMjUxODkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 11afa1d3284302b2c2bdbcc9e173352333bad74fb0ecf3c4a7e2a2fc22e78498 |
| hovercard-subject-tag | pull_request:53922981 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodegit/nodegit/pull/836/files |
| twitter:image | https://avatars.githubusercontent.com/u/291007?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/291007?s=400&v=4 |
| og:image:alt | Prototype for a solution to #827 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ab2497d9345a59709926b385d88458fa5932c82ec066288448eb68b34cbcbbda |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ba0ac57287507693938b0a2de45402a22cda0785 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/nodegit/nodegit/pull/836/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fnodegit%2Fpull%2F836%2Ffiles |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub Copilot appDirect agents from issue to merge | https://github.com/features/ai/github-app |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| Code QualityEnforce quality at merge | https://github.com/features/code-quality |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| View all resources | https://github.com/resources |
| GitHub SponsorsFund open source developers | https://github.com/open-source/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/open-source/accelerator |
| GitHub Stars | https://stars.github.com |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fnodegit%2Fpull%2F836%2Ffiles |
|
Sign up
| https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodegit%2Fnodegit |
| Reload | https://github.com/nodegit/nodegit/pull/836/files |
| Reload | https://github.com/nodegit/nodegit/pull/836/files |
| Reload | https://github.com/nodegit/nodegit/pull/836/files |
| Please reload this page | https://github.com/nodegit/nodegit/pull/836/files |
|
nodegit
| https://github.com/nodegit |
| nodegit | https://github.com/nodegit/nodegit |
|
Notifications
| https://github.com/login?return_to=%2Fnodegit%2Fnodegit |
|
Fork
698
| https://github.com/login?return_to=%2Fnodegit%2Fnodegit |
|
Star
5.8k
| https://github.com/login?return_to=%2Fnodegit%2Fnodegit |
|
Code
| https://github.com/nodegit/nodegit |
|
Issues
343
| https://github.com/nodegit/nodegit/issues |
|
Pull requests
20
| https://github.com/nodegit/nodegit/pulls |
|
Actions
| https://github.com/nodegit/nodegit/actions |
|
Projects
| https://github.com/nodegit/nodegit/projects |
|
Security and quality
0
| https://github.com/nodegit/nodegit/security |
|
Insights
| https://github.com/nodegit/nodegit/pulse |
|
Code
| https://github.com/nodegit/nodegit |
|
Issues
| https://github.com/nodegit/nodegit/issues |
|
Pull requests
| https://github.com/nodegit/nodegit/pulls |
|
Actions
| https://github.com/nodegit/nodegit/actions |
|
Projects
| https://github.com/nodegit/nodegit/projects |
|
Security and quality
| https://github.com/nodegit/nodegit/security |
|
Insights
| https://github.com/nodegit/nodegit/pulse |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fnodegit%2Fnodegit%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fnodegit%2Fnodegit%2Fissues%2Fnew%2Fchoose |
| johnhaley81 | https://github.com/johnhaley81 |
| nodegit:master | https://github.com/nodegit/nodegit/tree/master |
| srajko:thread-safety-locking | https://github.com/srajko/nodegit/tree/thread-safety-locking |
|
Conversation
15
| https://github.com/nodegit/nodegit/pull/836 |
|
Commits
20
| https://github.com/nodegit/nodegit/pull/836/commits |
|
Checks
0
| https://github.com/nodegit/nodegit/pull/836/checks |
|
Files changed
| https://github.com/nodegit/nodegit/pull/836/files |
| Please reload this page | https://github.com/nodegit/nodegit/pull/836/files |
|
Thread safety implementation using locking
| https://github.com/nodegit/nodegit/pull/836/files#top |
|
Show all changes
20 commits
| https://github.com/nodegit/nodegit/pull/836/files |
|
f07b098
Add LockMaster
srajko Dec 17, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/f07b0989a0803dc143687cf7f67637db951af2f3 |
|
64ba08a
Use LockMaster for sync and async functions
srajko Dec 17, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/64ba08a781b18c56d0517f62b34029f43e938821 |
|
cb92954
Move template specializations out of class definition
srajko Dec 17, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/cb92954d480b38b00e0526e44a22e6c49b56a5bd |
|
81740e3
Add repo locking for commits
srajko Dec 17, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/81740e3ba55df8160c07b34d8f0da207e66e0382 |
|
12eca23
Remove use of auto
srajko Dec 17, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/12eca233b86e37aeac0f3c7d1f0951385832ad8c |
|
7579e3a
Add temporary unlock during callbacks
srajko Dec 17, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/7579e3ac1335db2475c334f882fa45628eac9568 |
|
7d31f52
Test callback deadlock
srajko Dec 18, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/7d31f5275e4f3b197326d24bb727101613c2007d |
|
908b8b5
Clean up mutexes
srajko Dec 18, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/908b8b59e371fecdeef85a019d028616a2a55726 |
|
c33fa10
Ensure mutexes are locked all at the same time
srajko Dec 18, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/c33fa10cdbf0cf3363436cb5d2bfbfabfae562b4 |
|
65a998d
Add opt-in / opt-out mechanism for thread safety
srajko Dec 18, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/65a998d37bbd1209621d1612c17adecdf6c690d8 |
|
040a4ee
Fix uv_mutex_trylock response handling
srajko Dec 23, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/040a4eee93c521f51f151a266a4ba16240d14bca |
|
5efab3f
Remove use of shared_ptr
srajko Dec 30, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/5efab3f13fdf8dd02813d1923ec9423f20990e8f |
|
4b506f7
Address c++11 warnings
srajko Dec 31, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/4b506f7cbd0d36b825aa20f1a1d991b9f632b496 |
|
7257e5e
Move LockMaster to its own files
srajko Dec 31, 2015
| https://github.com/nodegit/nodegit/pull/836/commits/7257e5ecf2ea810200aa8a8810c6f405a72a8d2c |
|
fb4603d
Reorganize and clean up code
srajko Jan 1, 2016
| https://github.com/nodegit/nodegit/pull/836/commits/fb4603dfc71378fdb77aaf6aa667beb3a89dd035 |
|
90d8073
Use auto, range-based for loops, and for_each
srajko Jan 4, 2016
| https://github.com/nodegit/nodegit/pull/836/commits/90d80732f1b337d01127048c0e9216a7e5d41ed1 |
|
ab3d2da
Use ObjectInfo instead of pair for readability
srajko Jan 4, 2016
| https://github.com/nodegit/nodegit/pull/836/commits/ab3d2da58d6d2e64fb8eeadb15d2d431bd15d781 |
|
dbce34f
Initialize LockMaster before using it
srajko Jan 5, 2016
| https://github.com/nodegit/nodegit/pull/836/commits/dbce34f9f6298c6df80f2e0771dcafef51a6c35f |
|
1c6ea17
Remove unused else
srajko Jan 6, 2016
| https://github.com/nodegit/nodegit/pull/836/commits/1c6ea17510dc155242b1db2b55e3c5be5fb81e36 |
|
7a5a37f
Make thread safety enable / disable more robust to toggling
srajko Jan 6, 2016
| https://github.com/nodegit/nodegit/pull/836/commits/7a5a37f48c0fa027fa420317d1ddb814512f5177 |
|
Clear filters
| https://github.com/nodegit/nodegit/pull/836/files |
| Please reload this page | https://github.com/nodegit/nodegit/pull/836/files |
| Please reload this page | https://github.com/nodegit/nodegit/pull/836/files |
|
lock_master.h
| https://github.com/nodegit/nodegit/pull/836/files#diff-edcd1b645f23e06e8b52e0ac0dcce34a71a4a7366da15d6f028ce732075fdce2 |
|
lock_master.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-99343f9984cbb0cd51cbc0eacd0f7a50b7b5912ab860fc63ecf5dd285ab42960 |
|
async_function.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-75aa5e6f48aaf84e3ba76da9670589713cd82043e55a5509e7c197742e5032ca |
|
callback_helpers.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-69c0456eeba2003f1d45121f0928c0eecea45117994a7221a16bc0884f14709a |
|
field_accessors.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-191a2d4dc20d49214a2b55f9d415677dc81fd14fe7c560a7598aefb46a0169d3 |
|
sync_function.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-7e46711f90e3a938b09d4bcdae2249b1b8811f3511280569536d86aa8ee250c6 |
|
binding.gyp
| https://github.com/nodegit/nodegit/pull/836/files#diff-e4864b3e985981d1b9cc4dbd855f8eab136659d24d7996a19acf61e8b38e1aa6 |
|
class_content.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-28618c5cbab5c17f45ffad773d9ad5486ff9c7b8b31c916d53616c98c751daa1 |
|
nodegit.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-ff2801d101275eadff8392f42e01554dab68f651d82524b1840170daa6499696 |
|
struct_content.cc
| https://github.com/nodegit/nodegit/pull/836/files#diff-242813fbf3504e90c186d8cd2636a37035a714fdef02498b6774d61b6a256978 |
|
index.js
| https://github.com/nodegit/nodegit/pull/836/files#diff-96573bdf80e231a9f89bbf0461eb41f9f3efb144eaae1c0ca05a62335844106b |
| generate/templates/manual/include/lock_master.h | https://github.com/nodegit/nodegit/pull/836/files#diff-edcd1b645f23e06e8b52e0ac0dcce34a71a4a7366da15d6f028ce732075fdce2 |
|
View file
| https://github.com/srajko/nodegit/blob/7a5a37f48c0fa027fa420317d1ddb814512f5177/generate/templates/manual/include/lock_master.h |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/nodegit/nodegit/pull/836/{{ revealButtonHref }} |
| Please reload this page | https://github.com/nodegit/nodegit/pull/836/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |