ObjFW  Check-in [a2ab241bc7]

Overview
Comment:OFThread: Set main thread to running
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a2ab241bc73398759b3967a588099c62c69c31398694c41fb648c53e94c9dabc
User & Date: js on 2019-08-02 12:23:55
Other Links: manifest | tags
Context
2019-08-02
12:24
Minor improvements for threads on Windows check-in: 3c865f9e41 user: js tags: trunk
12:23
OFThread: Set main thread to running check-in: a2ab241bc7 user: js tags: trunk
12:23
OFFileURLHandler: Fix #ifdef mismatch check-in: fd58565e71 user: js tags: trunk
Changes

Modified src/OFThread.m from [6c09ccf959] to [83f93c8053].

351
352
353
354
355
356
357

358
359
360
361
362
363
364
	return [OFThread currentThread].name;
}

+ (void)of_createMainThread
{
	mainThread = [[OFThread alloc] init];
	mainThread->_thread = of_thread_current();


	if (!of_tlskey_set(threadSelfKey, mainThread))
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}

- (instancetype)init







>







351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
	return [OFThread currentThread].name;
}

+ (void)of_createMainThread
{
	mainThread = [[OFThread alloc] init];
	mainThread->_thread = of_thread_current();
	mainThread->_running = OF_THREAD_RUNNING;

	if (!of_tlskey_set(threadSelfKey, mainThread))
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}

- (instancetype)init