Re: missing data with parallel and stdin

2016-05-23 Thread Era Scarecrow via Digitalmars-d-learn
On Monday, 23 May 2016 at 15:53:23 UTC, moechofe wrote: On Monday, 23 May 2016 at 14:16:13 UTC, Jack Stouffer wrote: Sounds like a data race problem. Use a lock on the file write operation and see if that helps. That didn't solve anything. What I observe is: when the process is slower, more fil

Re: missing data with parallel and stdin

2016-05-23 Thread moechofe via Digitalmars-d-learn
On Monday, 23 May 2016 at 14:16:13 UTC, Jack Stouffer wrote: Sounds like a data race problem. Use a lock on the file write operation and see if that helps. Like this?: synchronized(mutex) copy(source,dest); That didn't solve anything. What I observe is: when the process is slower, more fi

Re: missing data with parallel and stdin

2016-05-23 Thread Jack Stouffer via Digitalmars-d-learn
On Monday, 23 May 2016 at 08:59:31 UTC, moechofe wrote: void delegate(string source,string dest) handler; if(use_symlink) handler = delegate(string s,string d){ symlink(s,d); }; else handler = delegate(string s,string d){ copy(s,d); }; Boy that's a confusing way