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

mark julia threads as initialized #22987

Merged
merged 1 commit into from
Aug 3, 2017
Merged

mark julia threads as initialized #22987

merged 1 commit into from
Aug 3, 2017

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Jul 27, 2017

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.

@ararslan
Copy link
Member

Is it possible to add a test for this?

Copy link
Member

@Keno Keno left a 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.

@ararslan ararslan added the needs tests Unit tests are required for this change label Jul 28, 2017
@vtjnash vtjnash removed the needs tests Unit tests are required for this change label Aug 1, 2017
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
Copy link
Contributor

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 vtjnash merged commit a342e0f into master Aug 3, 2017
@vtjnash vtjnash deleted the jn/init-threads-world branch August 3, 2017 01:07
ararslan pushed a commit that referenced this pull request Sep 11, 2017
mark julia threads as initialized for cfunction

Ref #22987
(cherry picked from commit a342e0f)
ararslan pushed a commit that referenced this pull request Sep 13, 2017
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

Ref #22987
(cherry picked from commit 98a2d1d)
vtjnash added a commit that referenced this pull request Sep 14, 2017
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

Ref #22987
(cherry picked from commit 98a2d1d)
ararslan pushed a commit that referenced this pull request Sep 15, 2017
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

Ref #22987
(cherry picked from commit 98a2d1d)
ararslan pushed a commit that referenced this pull request Sep 16, 2017
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

Ref #22987
(cherry picked from commit 98a2d1d)
ararslan pushed a commit that referenced this pull request Sep 18, 2017
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

Ref #22987
(cherry picked from commit 98a2d1d)
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.

MethodError when using (indirectly) StaticArrays
4 participants