
I'm not sure if my lock usage is correct and safe. I wanted to know what will be best approach to deal with situation when one thread have to wait for being initialized by another so I written this test:
import java.util.concurrent.locks.ReentrantLock
import java.util.{TimerTask, Timer, Date}
im...