Skip to content

fix: ensure lock is hold when loading library#38

Merged
theHamsta merged 1 commit intorustnn:mainfrom
theHamsta:fix-loading
Apr 2, 2026
Merged

fix: ensure lock is hold when loading library#38
theHamsta merged 1 commit intorustnn:mainfrom
theHamsta:fix-loading

Conversation

@theHamsta
Copy link
Copy Markdown
Contributor

Otherwise two threads might race to load a library at the same time.

This would be a problem when the global gets init twice and two reader threads get different library handles from which one gets dropped.

@theHamsta theHamsta requested a review from mtavenrath April 2, 2026 07:23
@mtavenrath
Copy link
Copy Markdown
Contributor

Is the failing test related to this change?

Otherwise two threads might race to load a library at the same time.

This would be a problem when the global gets init twice and two
reader threads get different library handles from which one gets
dropped.
@theHamsta theHamsta merged commit 638a53d into rustnn:main Apr 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants