Ultralite C++ API documentation mentions: "If an application requires multiple threads accessing the UltraLite database, each thread requires a separate connection". But I´ve found nothing about multi-threading in UltraliteJ documentation and my tests do not fail when accessing the same connection through different threads.
I want to access (execute SELECT statements) the same UL connection in many concurrent threads in a Ultralite Android application, is it safe?
asked 10 Jan '12, 10:07
We do not recommend the concurrent use of connections. While individual API calls will behave correctly, conncurrent calls will mess up error tracking or cursor positions. UltraLiteJ for Android uses the C++ UltraLite under the covers and even for UltraLiteJ we do not recommend concurrent use of Connections.
You can can create a connection in on thread and "pass it" to another.
answered 10 Jan '12, 10:19