Bug 678893 - Allow concurrent authentication sessions
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 27 Jul 2012 22:23:56 +0000 (18:23 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Sat, 28 Jul 2012 00:27:59 +0000 (20:27 -0400)
commit45cd76e600322bec2097c32ccc2f6e421b8fad28
tree9f4e0c8ba14457fa5f9cbca3eac9b7bc16024ac2
parentb68a9980d0eddf6b4e4fa3abacc451f3e1933f65
Bug 678893 - Allow concurrent authentication sessions

I wrote the original queuing algorithm for authentication requests to
serialize requests to ensure password prompts never pile up.  But that
means requests for which a cached password exists may wait longer than
necessary, especially if an authentication session already in progress
is taking a long time to complete.

This was before I started using GcrSystemPrompt, which also serializes
requests to ensure password prompts never pile up.  That frees us up to
process authentication requests for different data sources concurrently.

This commit simplifies the queuing algorithm significantly and also
makes it thread-safe so authentication requests can be submitted from
any thread.  This is going to be important for ECollectionBackends.
libebackend/e-source-registry-server.c