Parsing a UTF-16LE file line by line, BUG?

Era Scarecrow via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 27 00:47:53 PST 2017


On Friday, 27 January 2017 at 07:02:52 UTC, Jack Applegame wrote:
> On Monday, 16 January 2017 at 14:47:23 UTC, Era Scarecrow wrote:
>>     static char[1024*4] buffer;  //4k reusable buffer, NOT 
>> thread safe
>
> Maybe I'm wrong, but I think it's thread safe. Because static 
> mutable non-shared variables are stored in TLS.

  Perhaps, but fibers or other instances of sharing the buffer 
wouldn't be safe/reliable, at least not for long.


More information about the Digitalmars-d-learn mailing list