https://github.com/JuliaLang/julia
Revision 0c2fb633886ef11067ceccc8ce121a4b0ffdb857 authored by Tim Besard on 12 March 2021, 15:47:56 UTC, committed by Tim Besard on 12 March 2021, 16:11:32 UTC
Certain libraries are configured using global or thread-local state
instead of passing handles to every function. CUDA, for example, has a
`cudaSetDevice` function that binds a device to the current thread for
all future API calls. This is at odds with Julia's task-based
concurrency, which presents an execution environment that's local to the
current task (e.g., in the case of CUDA, using a different device).

This PR adds a hook mechanism that can be used to detect task switches,
and synchronize Julia's task-local environment with the library's global
or thread-local state.
1 parent d234931
History
Tip revision: 0c2fb633886ef11067ceccc8ce121a4b0ffdb857 authored by Tim Besard on 12 March 2021, 15:47:56 UTC
RFC: Add a hook for detecting task switches.
Tip revision: 0c2fb63
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.clang-format -rw-r--r-- 3.3 KB
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 283 bytes
.mailmap -rw-r--r-- 11.0 KB
CITATION.bib -rw-r--r-- 2.6 KB
CONTRIBUTING.md -rw-r--r-- 19.7 KB
HISTORY.md -rw-r--r-- 313.1 KB
LICENSE.md -rw-r--r-- 5.0 KB
Make.inc -rw-r--r-- 48.0 KB
Makefile -rw-r--r-- 25.3 KB
NEWS.md -rw-r--r-- 3.8 KB
README.md -rw-r--r-- 6.8 KB
VERSION -rw-r--r-- 10 bytes
sysimage.mk -rw-r--r-- 3.9 KB

README.md

back to top