@@ -75,10 +75,18 @@ OFMutableDictionary *_threadDictionary; @private OFString *_Nullable _name; } +# ifdef OF_HAVE_CLASS_PROPERTIES +@property (class, readonly, nullable, nonatomic) OFThread *currentThread; +@property (class, readonly, nullable, nonatomic) OFThread *mainThread; +@property (class, readonly, nullable, nonatomic) + OFMutableDictionary *threadDictionary; +@property (class, nullable, copy, nonatomic) OFString *name; +# endif + /*! * The name for the thread to use when starting it. * * @note While this can be changed after the thread has been started, it will * have no effect once the thread started. If you want to change the name @@ -138,26 +146,26 @@ /*! * @brief Returns the current thread. * * @return The current thread */ -+ (OFThread *)currentThread; ++ (nullable OFThread *)currentThread; /*! * @brief Returns the main thread. * * @return The main thread */ -+ (OFThread *)mainThread; ++ (nullable OFThread *)mainThread; /*! * @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. */ -+ (OFMutableDictionary *)threadDictionary; ++ (nullable OFMutableDictionary *)threadDictionary; #endif /*! * @brief Suspends execution of the current thread for the specified time * interval.