Kitura / Kitura/Swift-Kuery-SQLite
[Issue] libsqlite3.dylib: illegal multi-threaded access to database connection?
- Dominant language
- Swift
- Stars
- 16
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
macOS 10.15.6
Xcode 11.6
How do i resolve this problem?
#### [logging] BUG IN CLIENT OF libsqlite3.dylib: illegal multi-threaded access to database connection
```
self.pool = SQLiteConnection.createPool(filename: self.fileName,
poolOptions: ConnectionPoolOptions(initialCapacity: 10,
maxCapacity: 30))
Database.default = Database(pool)
```
#### Could update SQLiteConnection.swift ?
```
public static func createPool(_ location: Location = .inMemoryShared, poolOptions: ConnectionPoolOptions) -> ConnectionPool {
let connectionGenerator: () -> Connection? = {
let connection = SQLiteConnection(location)
//if sqlite3_open(location.description, &connection.connection) != SQLITE_OK {
if sqlite3_open_v2(location.description, &connection.connection, SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nil) != SQLITE_OK {
return nil
}
.
.
.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.