From 47f5203faa57c6d3dc0937d902a6efd3ae309638 Mon Sep 17 00:00:00 2001
From: Jeff Hill
SELECTca_disable_preemptive_callback. If
- ca_enable_preemptive_callback is specified then CA client background
- activities, such as connection management, will proceed even if the
- thread that calls this routine is not executing in the CA client
- library.First, if preemptive callback mode is enabled the developer must
+ provide mutual exclusion protection for his data structures. In this
+ mode it's possible for two threads to touch the application's data
+ structures at once: this might be the initializing thread (the thread
+ that called ca_context_create) and also a private thread created by the
+ CA client library for the purpose of receiving network messages and
+ calling callbacks. It might be prudent for developers who are
+ unfamiliar with mutual exclusion locking in a multi-threaded
+ environment to specify ca_disable_preemptive_callback.
Second, if preemptive callback mode is enabled the application is no
+ longer burdened with the necessity of periodically polling the CA
+ client library in order that it might take care of its background
+ activities. If ca_enable_preemptive_callback is specified
+ then CA client background activities, such as connection management,
+ will proceed even if the thread that calls this routine is not
+ executing in the CA client library. Furthermore, in preemptive callback
+ mode callbacks might be called with less latency because the library is
+ not required to wait until the initializing thread (the thread that
+ called ca_context_create) is executing within the CA client library.