ObjFW  Check-in [9825bfe451]

Overview
Comment:Detach the thread if it was not joined but we want to re-run it.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9825bfe45142bfa38cee437d069e2c4cff56055b4a53176b8893936d8f609ed9
User & Date: js on 2011-04-12 13:06:27
Other Links: manifest | tags
Context
2011-04-12
13:21
Release the old return value when restarting a thread. check-in: b3fa788a4e user: js tags: trunk
13:06
Detach the thread if it was not joined but we want to re-run it. check-in: 9825bfe451 user: js tags: trunk
12:43
Detach threads when we never joined them. check-in: 70b77b9b3a user: js tags: trunk
Changes

Modified src/OFThread.m from [ec95778541] to [b7fb0c0ce5].

239
240
241
242
243
244
245



246
247
248
249
250
251
252
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255







+
+
+







}

- (void)start
{
	if (running == OF_THREAD_RUNNING)
		@throw [OFThreadStillRunningException newWithClass: isa
							    thread: self];

	if (running = OF_THREAD_WAITING_FORJOIN)
		of_thread_detach(thread);

	[self retain];

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