← Docs
kotlin-stdlib / kotlin.concurrent / java.util.concurrent.locks.Lock / withLock

withLock

JVM
1.0
inline fun < T > Lock . withLock ( action : ( ) -> T ) : T
(source)

Executes the given action under this lock.

Return the return value of the action.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .