Mirror of
forum.nim-lang.org
index
4466 :: Experimental parallel?
[2018-12-12T17:02:58+01:00]
View Orginal
apos80
(orginal)
[2018-12-12T17:02:58+01:00]
view original
It seems that parallel using spawn is experimental. Is it safe to use?
Araq
(orginal)
[2018-12-12T18:05:15+01:00]
view original
If you manage to convince the
"
disjoint checker
"
you can use it, but unfortunately the underlying
threadpool
library is also pretty unreliable. But the worst offender here is the
blockUntilAny
API which
parallel
does not use.
apos80
(orginal)
[2018-12-12T18:16:26+01:00]
view original
Damn, I like parallel computation.
mratsim
(orginal)
[2018-12-12T19:08:43+01:00]
view original
Depending on your parallel use case:
if you need data parallelism, you can use OpenMP, I wrote some helpers I find useful for
parallel tensor computations here
.
for task parallelism, there is an
example of a worker queue in nimx
apos80
(orginal)
[2018-12-12T19:21:17+01:00]
view original
Mostly math really.