Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.6k
Conditional @threads macro causing @threads requires a for loop expression error#58875
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hello, I frequently use@threads in my code, especially in personal packages. However, I often face tricky-to-debug errors when code is run "behind" a@threads macro. Because of that, I wanted to create a sort of overload or conditional version of@threads, something like @conditionalThreads(cond::Bool, loop). I came up with this solution:
However, I get this error:
While I understand the error (there is some kind of verification inside@threads), I do not know how to fix this problem. :( If anyone has an idea... |
BetaWas this translation helpful?Give feedback.