ObjFW  Diff

Differences From Artifact [d23b83fa63]:

To Artifact [828c1402f4]:


57
58
59
60
61
62
63
64

65
66
67
68
69
70
71

72

73
74
75
76
77
78
79
57
58
59
60
61
62
63

64
65
66
67
68
69
70
71
72

73
74
75
76
77
78
79
80







-
+







+
-
+







 */
@interface OFRunLoop: OFObject
{
	OFMutableDictionary *_states;
#ifdef OF_HAVE_THREADS
	OFMutex *_statesMutex;
#endif
	of_run_loop_mode_t _currentMode;
	of_run_loop_mode_t _Nullable _currentMode;
	volatile bool _stop;
}

#ifdef OF_HAVE_CLASS_PROPERTIES
@property (class, readonly, nullable, nonatomic) OFRunLoop *mainRunLoop;
@property (class, readonly, nullable, nonatomic) OFRunLoop *currentRunLoop;
#endif
@property OF_NULLABLE_PROPERTY (readonly, nonatomic)
@property (readonly, nonatomic) of_run_loop_mode_t currentMode;
    of_run_loop_mode_t currentMode;

/*!
 * @brief Returns the run loop for the main thread.
 *
 * @return The run loop for the main thread
 */
+ (nullable OFRunLoop *)mainRunLoop;
117
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
134







-
+









 * @brief Run the run loop until an event or timer occurs or the specified
 *	  deadline is reached.
 *
 * @param mode The mode in which to run the run loop
 * @param deadline The date until which the run loop should run at the longest
 */
- (void)runMode: (of_run_loop_mode_t)mode
     beforeDate: (OFDate *)deadline;
     beforeDate: (nullable OFDate *)deadline;

/*!
 * @brief Stops the run loop. If there is still an operation being executed, it
 *	  is finished before the run loop stops.
 */
- (void)stop;
@end

OF_ASSUME_NONNULL_END