![]() |
![]() |
![]() |
GNOME Data Access 4 manual | ![]() |
---|
Each database provider should be usable in a multi threaded environment, even if they impose some restrictions as to how they can be used in such an environment. The Libgda's framework provides some locking mechanism which is:
if multi threading cannot be supported at all (for example if the client library internally
used by the provider does not support it), then the provider should make sure it refuses to work
if used from any thread different than the thread which created it, the provider's class implementation
should set the class's limiting_thread
attribute to the thread which created it
using g_thread_self()
if multi threading is supported but any connection (or related object) can only be used by the thread in which it was created, then for each opened connection, the "thread-owner" connection's property must be set to the current thread (and other related objects must be locked in a similar way)
if no locking is done, then the provider is assumed to support full multi threading access,
in this case make sure to set class's limiting_thread
attribute to NULL.