MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / lock

Method lock

tests/wast.rs:328–336  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

326
327 impl MyState {
328 fn lock(&self) -> impl Drop + '_ {
329 let state = self.lock.lock().unwrap();
330 let mut state = self
331 .waiters
332 .wait_while(state, |cnt| *cnt >= MAX_CONCURRENT_POOLING)
333 .unwrap();
334 *state += 1;
335 LockGuard { state: self }
336 }
337 }
338
339 struct LockGuard<'a> {

Callers 15

dropMethod · 0.45
lock_poolingFunction · 0.45
handleMethod · 0.45
newMethod · 0.45
dropMethod · 0.45
grow_toMethod · 0.45
new_memoryMethod · 0.45
host_memory_growFunction · 0.45

Calls 1

unwrapMethod · 0.45

Tested by 2

host_memory_growFunction · 0.36