ObjFW  Check-in [82fe4443e2]

Overview
Comment:Retain the thread in -[start] first to prevent a race condition.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 82fe4443e2b7fb3d8ab6f38b5f731f73c55792c3cc9d716aa3d2e6399990d5e3
User & Date: js on 2010-04-10 21:49:24
Other Links: manifest | tags
Context
2010-04-10
22:00
Add +[sleepForNMilliseconds:] to OFThread. check-in: 98b8d76bbc user: js tags: trunk
21:49
Retain the thread in -[start] first to prevent a race condition. check-in: 82fe4443e2 user: js tags: trunk
21:43
Minor fix for -[join] in OFThread. check-in: cc17787021 user: js tags: trunk
Changes

Modified src/OFThread.m from [12d687f3c9] to [e7e5a215e2].

135
136
137
138
139
140
141


142


143
144


145
146
147
148
149
150
151
152
153
135
136
137
138
139
140
141
142
143

144
145
146

147
148
149

150
151
152
153
154
155
156







+
+
-
+
+

-
+
+

-








- (void)handleTermination
{
}

- start
{
	[self retain];

	if (!of_thread_new(&thread, call_run, self))
	if (!of_thread_new(&thread, call_run, self)) {
		[self release];
		@throw [OFThreadStartFailedException newWithClass: isa];

	}

	running = OF_THREAD_RUNNING;
	[self retain];

	return self;
}

- (id)join
{
	if (running == OF_THREAD_NOT_RUNNING || !of_thread_join(thread))