Simplified BlockingCallback by using a CountDownLatch instead of Lock and Condition.