Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
signalapp
GitHub Repository: signalapp/Signal-iOS
Path: blob/main/SignalServiceKit/Concurrency/Threading.h
1 views
1
//
2
// Copyright 2024 Signal Messenger, LLC
3
// SPDX-License-Identifier: AGPL-3.0-only
4
//
5
6
NS_ASSUME_NONNULL_BEGIN
7
8
/// Returns YES if the result returned from dispatch_get_current_queue() matches
9
/// the provided queue. There's all sorts of different circumstances where these queue
10
/// comparisons may fail (queue hierarchies, etc.) so this should only be used optimistically
11
/// for perf optimizations. This should never be used to determine if some pattern of block dispatch is deadlock free.
12
BOOL DispatchQueueIsCurrentQueue(dispatch_queue_t queue);
13
14
/// Returns a value [0.0, 1.0] indicating the proportion of the current thread's stack that's in-use
15
/// Returns NaN on any unexpected error
16
/// Only for use in SignalServiceKit's promise implementation. Please do not use.
17
double _CurrentStackUsage(void);
18
19
NS_ASSUME_NONNULL_END
20
21