wcdb icon indicating copy to clipboard operation
wcdb copied to clipboard

Any API for sqlite3_interrupt()?

Open leonylcatwork opened this issue 5 years ago • 3 comments

The language of WCDB

Objective

The version of WCDB

v1.0.7.5

The platform of WCDB

iOS

The installation of WCDB

Cocoapods

What's the issue?

We have some long running db task that we want to be able to interrupt if needed. When FMDB we have access to sqlite3_interrupt(). I cannot find that for WCDB. Please advise.

leonylcatwork avatar Feb 22 '20 22:02 leonylcatwork

No, there is no public interface for sqlite_interrupt.

RingoD avatar Feb 23 '20 08:02 RingoD

Will we be getting one in future release?

leonylcatwork avatar Feb 24 '20 01:02 leonylcatwork

No, I think.

Here's the bad case. sqlite_interrupt is something about multi-tasking. If the long running task thread happen to begin at the time after sqlite_interrupt but before the transaction of your new task, then sqlite_interrupt can not achieve your purpose. This is a low probability event. However, if something may happen, then it will happen.

RingoD avatar Mar 15 '20 02:03 RingoD

You can use WCTCancellationSignal since v2.0.4.

Qiuwen-chen avatar Mar 08 '24 03:03 Qiuwen-chen