Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make symbol resolution lazy #873

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

folded
Copy link
Contributor

@folded folded commented Aug 22, 2022

This delays the lookup of a symbol until it is first called, which
in turn allows us to write a test for extraction of native code from
a package.

This simplifies the process of supporting multiple paths for native
code loading and allows cleanup to occur on non-windows platforms when
the libllvmlite shared library is extracted to a temporary directory.
If two threads attempt to resolve the same symbol at the same time,
then both may test the symbol dictionary before the other has a chance
to insert a wrapper object, leading to both threads creating their
own wrapper.

Add double checked locking to avoid this possibility.
This delays the lookup of a symbol until it is first called, which
in turn allows us to write a test for extraction of native code from
a package.
@gmarkall
Copy link
Member

Note for reviewers: prior discussions on #829

@gmarkall gmarkall requested a review from esc August 23, 2022 14:52
@gmarkall gmarkall added this to the v0.40.0 milestone Aug 23, 2022
@esc esc removed their assignment Jan 16, 2023
@gmarkall gmarkall modified the milestones: v0.40.0, v0.41.0 Mar 28, 2023
@esc esc removed this from the v0.41.0rc1 milestone Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants