-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
mark julia threads as initialized #22987
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is it possible to add a test for this? |
Keno
approved these changes
Jul 28, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed to fix the pyjulia issue. Does need a test. Probably the embedding test is the right place to put this.
vtjnash
force-pushed
the
jn/init-threads-world
branch
from
August 1, 2017 21:34
3f900cd
to
d8d9135
Compare
vtjnash
force-pushed
the
jn/init-threads-world
branch
from
August 1, 2017 21:44
d8d9135
to
1538e61
Compare
tkelman
reviewed
Aug 1, 2017
examples/embedding/embedding.c
Outdated
jl_array_t* x = jl_alloc_array_1d(array_type , 10); | ||
jl_value_t* array_type = jl_apply_array_type((jl_value_t*)jl_float64_type, 1); | ||
jl_array_t* x = jl_alloc_array_1d(array_type, 10); | ||
// JL_GC_PUSH* is required here to ensures that `x` is not deleted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to ensure that
ensures that cfunction can see that Julia state is initialized on this thread also upgrades the embedding/examples test to handle exceptions better (e.g. to actually detect them) while testing for correctness
vtjnash
force-pushed
the
jn/init-threads-world
branch
from
August 2, 2017 18:27
1538e61
to
98a2d1d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This ensures that cfunction can see that Julia state is initialized on this thread, and thus letting it run in the newest world age.
I think this should fix JuliaPy/pyjulia#105, although I don't have pyjulia installed right now to test.