public void releaseMailAccountForThread ( final String accountReservationKey ) { lock . lock ( ) ; try { MailAccount mailAccount = lookupUsedMailAccountForCurrentThread ( accountReservationKey ) ; releaseMailAccountForThread ( mailAccount ) ; } finally { lock . unlock ( ) ; } }
Releases the mail account reserved under the specified reservation key for the current thread so it can be reused by another threads . Threads blocking on an attempt to reserved an account are notified .