template statistics
Steven Schveighoffer
schveiguy at gmail.com
Wed Jun 3 22:21:41 UTC 2020
On 6/3/20 5:29 PM, Stanislav Blinov wrote:
> On Wednesday, 3 June 2020 at 21:04:23 UTC, Steven Schveighoffer wrote:
>
>>> A thread-safe writeln would be threadsafe_writeln. Or, alternatively
>>> there would be a writeln and a not_threadsafe_writeln. No reason to
>>> pay for something you're not using. And still neither implementation
>>> would call into C, the OS is right there.
>>
>> writeln writes to a FILE *, which is C. There's no way around it. FILE
>> * is buffered i/o, so going around it would mean odd out-of-order output.
>
> There's no way around writing to a FILE*? I... hope you didn't mean what
> you wrote, all things considered ;)
Well, no way around it if you want writeln to do expected things ;)
Unless you are suggesting that Phobos completely drop support for
interleaving printf and writeln calls? If you are, I assure you Walter
will not accept that.
> I know what Phobos' writeln does. But whatever, this is not the topic.
> Maybe in another thread at another time...
Not sure why you think the implementation of Phobos using C for I/O is
not on-topic. It was you who suggested we could avoid it for certain
calls to writeln.
-Steve
More information about the Digitalmars-d
mailing list