basics of java concurrency - wait/notify mechanism