Skip to main content

acquire_resource

Function acquire_resource 

Source
pub unsafe fn acquire_resource(_key: usize)
Expand description

Records that the current thread owns the resource identified by key.

This is a no-op if the deadlock_detection feature is not enabled. Each recorded acquisition should be paired with a call to release_resource using the same key. The same key may be recorded more than once if a resource is acquired repeatedly by the same thread. Call this after the resource has been acquired.

ยงSafety

This must not be called from a callback passed to a parking-lot function.