How to use volatile in kotlin