Path: blob/main/SignalServiceKit/Concurrency/Threading.h
1 views
//1// Copyright 2024 Signal Messenger, LLC2// SPDX-License-Identifier: AGPL-3.0-only3//45NS_ASSUME_NONNULL_BEGIN67/// Returns YES if the result returned from dispatch_get_current_queue() matches8/// the provided queue. There's all sorts of different circumstances where these queue9/// comparisons may fail (queue hierarchies, etc.) so this should only be used optimistically10/// for perf optimizations. This should never be used to determine if some pattern of block dispatch is deadlock free.11BOOL DispatchQueueIsCurrentQueue(dispatch_queue_t queue);1213/// Returns a value [0.0, 1.0] indicating the proportion of the current thread's stack that's in-use14/// Returns NaN on any unexpected error15/// Only for use in SignalServiceKit's promise implementation. Please do not use.16double _CurrentStackUsage(void);1718NS_ASSUME_NONNULL_END192021