SQLITE3_BUSY_TIMEOUT(3) Library Functions Manual SQLITE3_BUSY_TIMEOUT(3)

sqlite3_busy_timeoutset a busy timeout

#include <sqlite3.h>

int
sqlite3_busy_timeout(sqlite3*, int ms);

This routine sets a busy handler that sleeps for a specified amount of time when a table is locked. The handler will sleep multiple times until at least "ms" milliseconds of sleeping have accumulated. After at least "ms" milliseconds of sleeping, the handler returns 0 which causes () to return SQLITE_BUSY.

Calling this routine with an argument less than or equal to zero turns off all busy handlers.

There can only be a single busy handler for a particular database connection at any given moment. If another busy handler was defined (using ()) prior to calling this routine, that other busy handler is cleared.

These declarations were extracted from the interface documentation at line 2842.

SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);

sqlite3(3), sqlite3_busy_handler(3), sqlite3_step(3), SQLITE_OK(3)

January 24, 2024 NetBSD 11.0