Adding strategized lock in TreaterUDP