Module parking_lot_core::parking_lot

source Β·

Modules§

  • [Experimental] Deadlock detection

Structs§

Enums§

  • Operation that unpark_filter should perform for each thread.
  • Result of a park operation.
  • Operation that unpark_requeue should perform.

Constants§

Statics§

Functions§

  • create_hashtable πŸ”’
    Returns a reference to the latest hash table, creating one if it doesn’t exist yet. The reference is valid forever. However, the HashTable it references might become stale at any point. Meaning it still exists, but it is not the instance in active use.
  • get_hashtable πŸ”’
    Returns a reference to the latest hash table, creating one if it doesn’t exist yet. The reference is valid forever. However, the HashTable it references might become stale at any point. Meaning it still exists, but it is not the instance in active use.
  • grow_hashtable πŸ”’
  • hash πŸ”’
  • lock_bucket πŸ”’
    Locks the bucket for the given key and returns a reference to it. The returned bucket must be unlocked again in order to not cause deadlocks.
  • Locks the bucket for the given key and returns a reference to it. But checks that the key hasn’t been changed in the meantime due to a requeue. The returned bucket must be unlocked again in order to not cause deadlocks.
  • lock_bucket_pair πŸ”’
    Locks the two buckets for the given pair of keys and returns references to them. The returned buckets must be unlocked again in order to not cause deadlocks.
  • park⚠
    Parks the current thread in the queue associated with the given key.
  • rehash_bucket_into πŸ”’ ⚠
    Iterate through all ThreadData objects in the bucket and insert them into the given table in the bucket their key correspond to for this table.
  • unlock_bucket_pair πŸ”’ ⚠
    Unlock a pair of buckets
  • Unparks all threads in the queue associated with the given key.
  • Unparks a number of threads from the front of the queue associated with key depending on the results of a filter function which inspects the ParkToken associated with each thread.
  • Unparks one thread from the queue associated with the given key.
  • Removes all threads from the queue associated with key_from, optionally unparks the first one and requeues the rest onto the queue associated with key_to.
  • with_thread_data πŸ”’