On Tue, May 24, 2016, 9:14 PM Zlatko <zladu...@gmail.com> wrote:

> On Monday, May 23, 2016 at 4:57:29 PM UTC+2, mh-cbon wrote:
>>
>> Hi,
>>
>> I m facing a badly weird issue which i can t tell if it s a bug, or an
>> error from my side.
>>
>>
> It's not a bug, it's a feature :)
>
> Seriously, *console.log* is *asynchronous*, because it can involve disk
> I/O (e.g you run a program but redirect the log to a file). In order not to
> block with such processes, console.log is made async.
>
> IIRC *console.error* is sync - so in this particular case you can use
> that. But you can also write to process.stdout and then make sure your
> stuff is written before you end the program.
>


I wish it were that simple! Both log and error were supposed to be sync,
unless they were redirected to files.

The weirdness the original post was about is quite possibly related to the
the "fun" described in https://github.com/nodejs/node/issues/6456

~Ryan
-- 

~Ryan

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAGjmZGyzr_BfFjoAXKNr9xBpvFL0-smm5%3D-fQctbgZMPR5a2DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to