Programming Windows D Examples are now Online!

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Jun 22 14:28:25 PDT 2011


On 6/22/11, Johannes Pfau <spam at example.com> wrote:
> Andrej Mitrovic wrote:
>>On 6/22/11, Dmitry Olshansky <dmitry.olsh at gmail.com> wrote:
>>> I'd say that is to be expected, e.g. when multiple processes (in this
>>> case two resource compilers) output  to the same stream (console) and
>>> has nothing to do with std.parallelism. One cure for that is to have
>>> them output to a unique temporary files or pipes.
>>> The only thing that's strange is that I'd expect it to happen in
>>> blocks as there should be buffering, but maybe they doesn't use it
>>> at all.
>>
>>But stdout is marked as shared. I would think that would solve the
>>issue of outputting from multiple threads?
>
> That's only true for D functions based on D stdout (D writeln, etc.).
> It doesn't apply to C printf, or different processes using the same
> console handle. I guess you use the std.process system function which
> afaik doesn't redirect the spawned processes output.
>
> --
> Johannes Pfau
>
>

Ah you're right, I'm using system and writeln() calls, so that might
be causing it.


More information about the Digitalmars-d-announce mailing list