add isHeldByCurrentThread implementation