Equiavalent of @threadcall but for Julia code?


#1

Is there a way to run a Julia function on another thread? As far as I can tell the current (and I do understand experimental) threading support provides for parallel threaded for loops and @threadcall for calling a c function in a separate thread. But is there, or will there soon be, a way to run Julia code (i.e. a function, task etc.) on a separate thread?


#2

Not at the moment. All Julia code must run in the main thread.


#3

Is anything like this potentially on the roadmap? For many problems it is useful to have more general threading than just splitting iterations. I’m sure I read somewhere that Tasks might eventually have concurrent execution.


#4

It’s on the 1.0 roadmap to support cilk-like spawn but it’s likely post 1.0 goal to support manually creating new threads.


#5

Great, a cilk-like spawn is exactly what I’m looking for. Is there somewhere I can see the plans / work in progress on this (an issue or branch on github?).


#6

Looks like a relevant issue is: