class MailboxImpl implements Mailbox {

	@Nonnull
	@Override
	public Runnable takeMail() throws InterruptedException, MailboxStateException {
		final ReentrantLock lock = this.lock;
		lock.lockInterruptibly();
		try {
			Runnable headLetter;
			while ((headLetter = takeHeadInternal()) == null) {
				notEmpty.await();
			}
			return headLetter;
		} finally {
			lock.unlock();
		}
	}

	public  MailboxImpl();

}