<commit_before>/**********************************************************************
 *
 * GEOS - Geometry Engine Open Source
 * http://geos.osgeo.org
 *
 * Copyright (C) 2012 <NAME> <<EMAIL>>
 *
 * This is free software; you can redistribute and/or modify it under
 * the terms of the GNU Lesser General Public Licence as published
 * by the Free Software Foundation. 
 * See the COPYING file for more information.
 *
 **********************************************************************/

#include <geos/util/Interrupt.h>
#include <geos/util/GEOSException.h> // for inheritance

namespace geos {
namespace util { // geos::util

class GEOS_DLL InterruptedException: public GEOSException {
public:
	InterruptedException() :
		GEOSException("InterruptedException", "Interrupted!") {}
};

void
Interrupt::interrupt() { throw InterruptedException(); }

bool Interrupt::requested = false;
Interrupt::Callback *Interrupt::callback = 0;
void *Interrupt::callback_arg = 0;

} // namespace geos::util
} // namespace geos

<commit_msg>Clear interruption request flag just before interrupting<commit_after>/**********************************************************************
 *
 * GEOS - Geometry Engine Open Source
 * http://geos.osgeo.org
 *
 * Copyright (C) 2012 <NAME> <<EMAIL>>
 *
 * This is free software; you can redistribute and/or modify it under
 * the terms of the GNU Lesser General Public Licence as published
 * by the Free Software Foundation. 
 * See the COPYING file for more information.
 *
 **********************************************************************/

#include <geos/util/Interrupt.h>
#include <geos/util/GEOSException.h> // for inheritance

namespace geos {
namespace util { // geos::util

class GEOS_DLL InterruptedException: public GEOSException {
public:
	InterruptedException() :
		GEOSException("InterruptedException", "Interrupted!") {}
};

void
Interrupt::interrupt() {
  requested = false;
  throw InterruptedException();
}

bool Interrupt::requested = false;
Interrupt::Callback *Interrupt::callback = 0;
void *Interrupt::callback_arg = 0;

} // namespace geos::util
} // namespace geos


{'fraction_non_alphanumeric': 0.23142050799623706, 'fraction_numerical': 0.005644402634054563, 'mean_word_length': 5.368263473053892, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4367219', 'n_tokens_mistral': 590, 'n_tokens_neox': 554, 'n_words': 174}