is this a proper way to lock the bool: ```private ...
# android
m
is this a proper way to lock the bool:
Copy code
private object CONFIG_LOCK

    private var autoStartService: Boolean = false
    get() {
        return synchronized(CONFIG_LOCK){
            field
        }
    }
    set(value) {
        synchronized(CONFIG_LOCK){
            field = value
        }
    }