Skip to content

Commit

Permalink
Add interrupts
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Keyes committed Jan 26, 2018
1 parent bc0498a commit efd428a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/splitters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ DataFrame internal_split_clf(CharacterVector requests){

for(unsigned int i = 0; i < input_length; i++){

if((i % 10000) == 0){
Rcpp::checkUserInterrupt();
}

// Handle the case where the input is an NA
if(requests[i] == NA_STRING){

Expand Down Expand Up @@ -81,6 +85,10 @@ DataFrame internal_split_squid(CharacterVector requests){

for(unsigned int i = 0; i < input_length; i++){

if((i % 10000) == 0){
Rcpp::checkUserInterrupt();
}

// Handle the case where the input is an NA
if(requests[i] == NA_STRING){

Expand Down

0 comments on commit efd428a

Please sign in to comment.