noirello / bonsai

Simple Python 3 module for LDAP, using libldap2 and winldap C libraries.
MIT License
117 stars 33 forks source link

LDAPClient.connect not a coroutine #1

Closed hatlessman closed 9 years ago

hatlessman commented 9 years ago

Any chance of making it one? Its takes a non-trivial amount of time and if the loop could be doing things while waiting on network things that would be great.

Good work by the way.

noirello commented 9 years ago

The main reason why the connect method is not a coroutine is because WinLDAP hasn't got an asynchronous ldap_start_tls function (which is part of the connect method). But I've looked into it now and I've found out that it can be very easily implemented by myself.

With some luck I will be able to create a new release that will include the connect coroutine at the end of the week.

noirello commented 9 years ago

New release is on the master branch (Sorry for the tremendous delay, things were complicated than they looked at the first place).

I had to use C threads on both platform for achieving better asynchronous functions.