Closed programus closed 3 years ago
There's no recommended way. I think it depends on the situation which one is preferable.
But running multiple LDAP requests concurrently shouldn't be different than SQL or HTTP requests, if you're interested in the pros and cons of async IO and threaded solutions.
I found bonsai recently and I am trying to change the LDAP searching part in my project from ldap3 to bonsai since ldap3 is too slow especially establishing the first connection.
I need to search many data at the same time, so I wonder what is the recommended way to do this concurrent by using bonsai?
I worked out a coroutine way and a thread way:
but I am not sure which one is better and whether there is a better way than both these two.