[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3665) Multi-Listener Thread Support

 On 8/3/10 4:52 PM, Hallvard B Furuseth wrote:
Howard Chu writes:
Unfortunately, at this time writing lockless algorithms means
resorting to heavily machine-dependent code and we've been trying to
stick to standardized e.g. POSIX APIs. It would be pretty easy to
write a CPU-cache-friendly producer/consumer queue in assembly
language for a few specific architectures, and maybe doable using
compiler-specific intrinsics, but our portability would go out the
Portability just means there should be a fall-back implementation which
uses the ldap_pvt_thread_*() locking functions.  Or if it is made a
separate library from OpenLDAP, it could use macros which default to
pthread_*() but could be overridden to use ldap_pvt_thread_*().

No wonder why I prefer Java :) ...

Macros... Sad memories :/

Emmanuel Lécharny