[Rd] Are Rprintf and REprintf thread-safe?

Winston Chang winstonchang1 at gmail.com
Tue Nov 21 18:40:29 CET 2017


Is it safe to call Rprintf and REprintf from a background thread? I'm
working on a package that makes calls to fprintf(stderr, ...) on a
background thread when errors happen, but when I run R CMD check, it
says:

  Compiled code should not call entry points which might terminate R nor
  write to stdout/stderr instead of to the console, nor the system RNG.

Is it safe to replace these calls with REprintf()?

-Winston



More information about the R-devel mailing list