It's a very complex problem : synchronization for logout.
2 uses cases can occur :
- multiple logouts happening at the same time on different CAS servers of the cluster
- multiple logouts happening at the same time on just one CAS server.

If you have a cluster of CAS servers, I think it's pretty impossible to achieve a *distributed synchronized* on TGT for logout. Let's forget about this one.

Let's target multiples concurrent logouts on the same CAS server and think about memcached storage.
We will have 2 HTTP requests, 2 calls to memcached and 2 different rehydrated TGTs. The only way to synchronize properly is to do it for a shared object between both requests : the ```CentralAuthenticationService```. So you're totally right, we would need to synchronize the ```destroyTicketGrantingTicket``` method.

But, at that time, the ```destroyTicketGrantingTicket``` method is not ```synchronized```, the synchronization is handled through the ```synchronized expire``` method  which calls the ```logOutOfServices``` method. **So far, the logout is not properly synchronized** and we didn't get any complain about that.

So my proposal would be to keep this kind of synchronization (not global on destroyTGT) but without synchronizing the back channel HTTP calls (as it's done right now). So what's why I wanted to synchronize the retrieval and cleaning of the services : not perfect I admit, but as safe as it's done now, with better performance.

One more thing I'd like to propose to improve things is to add an ```updateTicket()``` call in the ```removeAllServices``` method of the ```TicketDelegator``` to synchronize also the update of the storage.