@@ -95,10 +95,11 @@ #ifdef OF_HAVE_CLASS_PROPERTIES # ifdef OF_HAVE_THREADS @property (class, readonly, nullable, nonatomic) OFThread *currentThread; @property (class, readonly, nullable, nonatomic) OFThread *mainThread; +@property (class, readonly, nonatomic) bool isMainThread; @property (class, readonly, nullable, nonatomic) OFMutableDictionary *threadDictionary; @property (class, nullable, copy, nonatomic) OFString *name; # endif # ifdef OF_HAVE_SOCKETS @@ -186,10 +187,17 @@ * * @return The main thread */ + (nullable OFThread *)mainThread; +/*! + * @brief Returns whether the current thread is the main thread. + * + * @return Whether the current thread is the main thread. + */ ++ (bool)isMainThread; + /*! * @brief Returns a dictionary to store thread-specific data, meaning it * returns a different dictionary for every thread. * * @return A dictionary to store thread-specific data