These “already parallelized basic functions” are just normal Julia functions. So, you can do the same for your hand-rolled function. For example, if you can rephrase your program as a Divide-and-conquer algorithm, it’s often straightforward to use this strategy. Even if this does not work, as I said in Async limit - #3 by tkf, I’d recommend using the “worker pool” pattern rather than semaphore. For more specific comments, I think it’d be helpful if you can provide an MWE.
1 Like