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

Add flag to funptr to register calling threads with C. #269

Closed
yallop opened this issue Feb 6, 2015 · 0 comments · Fixed by #420
Closed

Add flag to funptr to register calling threads with C. #269

yallop opened this issue Feb 6, 2015 · 0 comments · Fixed by #420

Comments

@yallop
Copy link
Owner

yallop commented Feb 6, 2015

C threads that call into OCaml must first be registered with the runtime using caml_c_thread_register. This is sometimes a difficult requirement to meet when when calling into OCaml through a funptr, since threads may be created inside third-party code that it is not possible to modify.

It'd be convenient to have an option to funptr to wrap calls in caml_c_thread_register and caml_c_thread_unregister, much as the runtime_lock argument makes it possible to acquire and release the runtime lock when calling back into OCaml from C.

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 a pull request may close this issue.

1 participant