ThreadTools.jl
ThreadTools.jl copied to clipboard
add `@maybe_threads`
So instead of
if threading
@threads for x in y
foo etc.
end
else
for x in y
foo etc.
end
end
you can do
@maybe_threads threading for x in y
foo etc.
end
Todo:
- [ ] Handle schedule arg
- [ ] Add tests
- [ ] Add docs
cool :tada: I've wanted something like this for a long time :)