macro optthreads(switch,code)
:(
if $(esc(switch))
esc(:(Threads.@threads $$code))
else
$(esc(code))
end
)
end
function test(par)
@optthreads par for i in 1:80
print(Threads.threadid())
end
end
test(true)
i cannot seem to figure how to correctly nest a macro inside a macro, can anybody please help?