Differences From Artifact [69e72c6c45]:
- File src/OFThread.h — part of check-in [7d86d2dd2b] at 2018-06-16 14:15:38 on branch trunk — Wrap a few @public in #ifdefs (user: js, size: 6596) [annotate] [blame] [check-ins using]
To Artifact [76cb344740]:
- File
src/OFThread.h
— part of check-in
[2fb0769744]
at
2018-08-11 20:25:04
on branch trunk
— Add +[OFThread DNSResolver]
This returns the DNS resolver for the current thread. (user: js, size: 7052) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #endif OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFDate; @class OFRunLoop; @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); #if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS) /*! * @brief A block to be executed in a new thread. * | > > > | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #endif OF_ASSUME_NONNULL_BEGIN /*! @file */ @class OFDate; #ifdef OF_HAVE_SOCKETS @class OFDNSResolver; #endif @class OFRunLoop; @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); #if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS) /*! * @brief A block to be executed in a new thread. * |
︙ | ︙ | |||
70 71 72 73 74 75 76 77 78 | of_thread_block_t _Nullable _threadBlock; # endif id _returnValue; OFRunLoop *_Nullable _runLoop; OFMutableDictionary *_threadDictionary; @private OFString *_Nullable _name; } | > > > > | > > > > > > | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | of_thread_block_t _Nullable _threadBlock; # endif id _returnValue; OFRunLoop *_Nullable _runLoop; OFMutableDictionary *_threadDictionary; @private OFString *_Nullable _name; # ifdef OF_HAVE_SOCKETS OFDNSResolver *_DNSResolver; # endif } #endif #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, nullable, nonatomic) OFMutableDictionary *threadDictionary; @property (class, nullable, copy, nonatomic) OFString *name; # endif # ifdef OF_HAVE_SOCKETS @property (class, readonly, nonatomic) OFDNSResolver *DNSResolver; # endif #endif #ifdef OF_HAVE_THREADS /*! * @brief 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 * of the current thread after it has been started, look at the class * method @ref setName:. |
︙ | ︙ | |||
156 157 158 159 160 161 162 | */ + (nullable OFThread *)mainThread; /*! * @brief Returns a dictionary to store thread-specific data, meaning it * returns a different dictionary for every thread. * | | > > > > > > > > > | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | */ + (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 */ + (nullable OFMutableDictionary *)threadDictionary; #endif #ifdef OF_HAVE_SOCKETS /*! * @brief Returns the DNS resolver for the current thread. * * @return The DNS resolver for the current thread */ + (OFDNSResolver *)DNSResolver; #endif /*! * @brief Suspends execution of the current thread for the specified time * interval. * * @param timeInterval The number of seconds to sleep */ |
︙ | ︙ |