Hi Chris, On 2016-11-08 23:58, Chris Double wrote: > I tried to duplicate the basics of your code with the following: > > self '[ "bash -c \"sleep 10\"" run-process drop 1 _ send ] "1" spawn > self '[ "bash -c \"sleep 5\"" run-process drop 2 _ send ] "2" spawn > receive > > This will spawn two threads that run a bash 'sleep'. The 'receive' > blocks until the shortest sleep finishes and if you run another > 'receive' then it blocks until the longer one completes. This should > be what your code does too. Are you sure the git commands aren't all > completing at the same time?
After a simple test you are right, the threads send the message at the same time. I'm still left wondering why. There's e.g. 10 threads running a `(thread on stack here) "git pull" run-process "pulled" send`. Now the git output comes to stdout intermixed and only after all threads finished with the run-process do they get time to send the message. Any more ideas why? Is run-process blocking everyone? Is there some FFI call like you mentioned? Where could I start to debug this on my own? > > Note the use of the 'fry' quotation to avoid having to curry and swap > later to pass the 'self' around btw. Yes looks much cleaner, thanks. I am avoiding fry and locals and similar helpers for now to train the shuffling/composing more. Thank you for your answer, much appreciated. -- ------------ Peter Nagy ------------ ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk