1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Initial attempt at making sqlite3_interrupt() work even when called from

a separate thread. (CVS 3335)

FossilOrigin-Name: 35fd67d7a0c55797eb460e3bd02c96afe619f026
This commit is contained in:
drh
2006-07-26 01:39:30 +00:00
parent 5bd270b200
commit 881feaa043
8 changed files with 35 additions and 32 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.352 2006/07/11 14:17:52 drh Exp $
** $Id: main.c,v 1.353 2006/07/26 01:39:30 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -382,8 +382,8 @@ int sqlite3_busy_timeout(sqlite3 *db, int ms){
** Cause any pending operation to stop at its earliest opportunity.
*/
void sqlite3_interrupt(sqlite3 *db){
if( !sqlite3SafetyCheck(db) ){
db->flags |= SQLITE_Interrupt;
if( db && (db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_BUSY) ){
db->u1.isInterrupted = 1;
}
}