Process in parallel and output result to stdout theread-safely

ag0aep6g anonymous at example.com
Sat Sep 8 14:26:45 UTC 2018


On 09/03/2018 08:13 PM, Dr.No wrote:
> But it in the middle of output, I got output like this:
> 
>> outjson = {"barCode":"XXXX20","ade":"20"}♪◙outjson = 
>> {"barCode":"XXXXX21","ade":"21"}
> 
> also there's that extra ♪◙ character. Thos sounds memory violation 
> somewhere.
> This only happens when using parallel. Any guess what's possibily happeing?

If that only ever happens at line breaks, then that doesn't necessarily 
look like memory corruption to me.

I looked around a bit and found code page 437 [1]. It has those 
characters at 0xD and 0xA which is where ASCII has \r and \n. So it 
might be that code page 437 is used when displaying that particular 
entry. Why that would happen, I have no idea.

To get better help, you should post a complete test case that people can 
just copy/paste. That includes imports, a `main` function, and the 
command you use to compile. Also add information about your environment 
(OS, compiler version).


[1] https://en.wikipedia.org/wiki/Code_page_437


More information about the Digitalmars-d-learn mailing list