[python-ldap] SyncreplConsumer running in parallel with other application

David Gabriel davidgab283 at gmail.com
Fri Jan 8 08:59:59 EST 2016

Hi all

After some investigation in the source code I think the function 'result4'
located in the file ldapobject.py is the responsible of this blocking
And to be more precise this is the blocking call: ldap_result =
Is there any way to ensure the update from ldap data base without causing
the blocking of other processes ?
Is there an asynchronous version of the syncrepl client ?
I notice the presence of this function: def
result(self,msgid=ldap.RES_ANY,all=1,timeout=None): that uses result2

Please advise me how to fix my issue ?
Thank you very much.
Kind regards

2016-01-08 2:40 GMT-08:00 David Gabriel <davidgab283 at gmail.com>:

> Dears
> Is there any way to enable the running of the syncrepl_poll procedure *in
> parallel* with other applications (non python-ldap applications) ?
> In fact I tried several manner to execute this procedure using threads and
> eventlets but always my program is blocking at syncrepl_poll procedure and
> it does not execute any other procedure.
> In other words I want that my program be updated from any change in my
> ldap db and parallely it should handle other events coming from non ldap
> events.
> Is there any other way to do this without using syncrepl_poll procedure ?
> Please any help is welcome.
> I am really blocked at this point !!
> Thanks in advance.
> Best regards
> 2016-01-07 7:06 GMT-08:00 David Gabriel <davidgab283 at gmail.com>:
>> Thanks Michael for your answer.
>> I tried to create one thread that executes the syncrepl application and
>> parallely I have other program (that does not deal with ldap) that I want
>> to run.
>> I think the 'syncrepl_poll' procedure is not asynchronous in such way
>> that allows other application to run at the same time.
>> Is it possible to replace 'syncrepl_poll' or update it to enable
>> parallel threading.
>> Thanks in advance.
>> Kind regards
>> 2016-01-07 15:47 GMT+01:00 Michael Ströder <michael at stroeder.com>:
>>> David Gabriel wrote:
>>> > I am using this python application
>>> > <
>>> https://github.com/rbarrois/python-ldap/blob/master/Demo/pyasn1/syncrepl.py
>>> >
>>> Note that this is a rather basic demo.
>>> > and
>>> > I want run it parallely with other application.
>>> It's not entirely clear what you exactly mean.
>>> > The problem is that I am blocked in this procedure 'syncrepl_poll'.
>>> > In other words, when this procedure is called no other
>>> operation/procedure
>>> > is made !!
>>> > Could you please tell me how to use the aformentionned application
>>> without
>>> > having a blocking issue in 'syncrepl_poll' procedure.
>>> Simply use different LDAP connections.
>>> Ciao, Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160108/7ee14f27/attachment.html>

More information about the python-ldap mailing list