Re: [Rcpp-devel] `checkUserInterrupt()` might not be safe if Rcout is used.

2018-07-29 Thread Wush Wu
Hi Kevin, I tried the latest master branch ("522e66d9ea04502b4a98bb28642fb4724ff0a479") in R 3.5.1, but the `checkUserInterrupt` still does not throw the exception. The R is under a docker container (library/r-base:3.5.1), so there should be no GUI. Hope these info helps. Best, Wush On Fri, Ju

Re: [Rcpp-devel] `checkUserInterrupt()` might not be safe if Rcout is used.

2018-07-26 Thread Wush Wu
On Fri, Jul 27, 2018 at 12:06 AM, Kevin Ushey wrote: > What environment are you executing this on? (R in terminal, or with a GUI; > which OS?) > Here is my session Info: ``` R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.4 LTS Matrix products: d

Re: [Rcpp-devel] `checkUserInterrupt()` might not be safe if Rcout is used.

2018-07-26 Thread Kevin Ushey
What environment are you executing this on? (R in terminal, or with a GUI; which OS?) One thing to be cautious of is that many R APIs in graphical environments will also call for processing of events, and this in turn can also imply a check for, and handling of, interrupts. Rprintf() is in fact on

[Rcpp-devel] `checkUserInterrupt()` might not be safe if Rcout is used.

2018-07-26 Thread Wush Wu
Hi all, I just learned the function `checkUserInterrupt` and played with it in my package today. At first, everything was good. However, I sensed something wrong when I interrupted my function and relaunched it. In my case, the thread number of OpenMP decreased to 1 after an user interruption. Ac