79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
-
+
|
}
- initWithObject: (id)obj
{
Class c;
self = [super init];
object = obj;
object = [obj copy];
#ifndef _WIN32
if (pthread_create(&thread, NULL, call_main, self)) {
#else
if ((thread =
CreateThread(NULL, 0, call_main, self, 0, NULL)) == NULL) {
#endif
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
+
|
#else
if (thread != INVALID_HANDLE_VALUE) {
TerminateThread(thread, 1);
CloseHandle(thread);
}
#endif
[object release];
[super dealloc];
}
@end
@implementation OFTLSKey
+ tlsKeyWithDestructor: (void(*)(void*))destructor
{
|