119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
#ifdef OF_HAVE_BLOCKS
+ threadWithBlock: (of_thread_block_t)block
{
return [[[self alloc] initWithBlock: block] autorelease];
}
+ threadWithBlock: (of_thread_block_t)block
object: (id)object
{
return [[[self alloc] initWithBlock: block
object: object] autorelease];
}
#endif
+ (void)setObject: (id)object
forTLSKey: (OFTLSKey*)key
{
id oldObject = of_tlskey_get(key->key);
|
>
|
<
|
|
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
#ifdef OF_HAVE_BLOCKS
+ threadWithBlock: (of_thread_block_t)block
{
return [[[self alloc] initWithBlock: block] autorelease];
}
+ threadWithObject: (id)object
block: (of_thread_block_t)block
{
return [[[self alloc] initWithObject: object
block: block] autorelease];
}
#endif
+ (void)setObject: (id)object
forTLSKey: (OFTLSKey*)key
{
id oldObject = of_tlskey_get(key->key);
|
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
return self;
}
#ifdef OF_HAVE_BLOCKS
- initWithBlock: (of_thread_block_t)block_
{
return [self initWithBlock: block_
object: nil];
}
- initWithBlock: (of_thread_block_t)block_
object: (id)object_
{
self = [super init];
@try {
block = [block_ copy];
object = [object_ retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
|
|
|
>
|
<
<
>
|
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
return self;
}
#ifdef OF_HAVE_BLOCKS
- initWithBlock: (of_thread_block_t)block_
{
return [self initWithObject: nil
block: block_];
}
- initWithObject: (id)object_
block: (of_thread_block_t)block_
{
self = [super init];
@try {
object = [object_ retain];
block = [block_ copy];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
|