sync() simply waits till all your spawned threads are finished. If you call
spawn n-times on the same proc it´s almost the same as parallel except that
parallel does some additionally checks for you. Also you don't need to collect
the FLowVars and check manually with ^ (on each FlowVar) (or use
I want to execute the code below at compile time to initialize the global
variables shown - modpg, rescnt, residues, ep.
proc genPGparameters(prime: int): tuple =
echo("generating parameters for P", prime)
let primes = [2, 3, 5, 7, 11, 13, 17, 19, 23]
var modpg = 1
Hey, look at the article Node.js vs Ruby on Rails -
[https://www.cleveroad.com/blog/node-js-vs-ruby-on-rails--the-power-behind-technologies](https://www.cleveroad.com/blog/node-js-vs-ruby-on-rails--the-power-behind-technologies)
Guess you will like it
You have replied to an invisible post, I guess it needs to be approved by
moderators
Good call.
[The
doco](https://nim-lang.org/docs/manual.html#parallel-spawn-parallel-statement)
doesn't use the `sync()`
Good job! I would suggest renaming "nimaws" to "aws" because "nim" is kinda
redundant here =). Also move the /s3_*.nim files to samples or smth.
Indeed Jack, I think sync() is nonsense when parallel statement is used.
what does the call to sync() do?
Hello all, I'm new here and to the language, though I've been hanging around
the Gitter for a couple weeks.
In my attempt to learn and create something useful I made
[https://github.com/Gooseus/nimaws](https://github.com/Gooseus/nimaws)
It has a useable (not at all perfect) Signaturev4 request
from [this post](https://forum.nim-lang.org/t/3257/2)
convert something like the following to suit your specific usage
var
LoopSz = faces.len
res: array[LoopSz, int]
parallel:
for i in 0..LoopSz-1:
spawn whateverNeedsDoingInParallel(...,
10 matches
Mail list logo