Overview
| Comment: | OFTimer: Fix -[waitUntilDone]. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
bbc8bb5ad1e92c0402ea462d857727e9 |
| User & Date: | js on 2012-10-02 00:01:44 |
| Other Links: | manifest | tags |
Context
|
2012-10-02
| ||
| 00:04 | Remove [OFThread initWithObject:block:]. (check-in: 31ff715036 user: js tags: trunk) | |
| 00:01 | OFTimer: Fix -[waitUntilDone]. (check-in: bbc8bb5ad1 user: js tags: trunk) | |
|
2012-09-30
| ||
| 14:10 | objfw-compile: Create build dir. (check-in: ca9963ce69 user: js tags: trunk) | |
Changes
Modified src/OFTimer.h from [c48810ddb2] to [7baf2bee73].
| ︙ | ︙ | |||
34 35 36 37 38 39 40 | id target, object1, object2; SEL selector; uint8_t arguments; BOOL repeats; #ifdef OF_HAVE_BLOCKS of_timer_block_t block; #endif | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | id target, object1, object2; SEL selector; uint8_t arguments; BOOL repeats; #ifdef OF_HAVE_BLOCKS of_timer_block_t block; #endif BOOL isValid, done; OFCondition *condition; } /** * \brief Creates and schedules a new timer with the specified time interval. * * \param interval The time interval after which the timer should be executed |
| ︙ | ︙ |
Modified src/OFTimer.m from [f36d27a475] to [acc1d91474].
| ︙ | ︙ | |||
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
break;
}
#ifdef OF_HAVE_BLOCKS
}
#endif
[condition lock];
[condition signal];
[condition unlock];
if (repeats && isValid) {
OFDate *old = fireDate;
fireDate = [[OFDate alloc]
initWithTimeIntervalSinceNow: interval];
[old release];
| > > > > | 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
break;
}
#ifdef OF_HAVE_BLOCKS
}
#endif
[condition lock];
@try {
done = YES;
[condition signal];
} @finally {
[condition unlock];
}
if (repeats && isValid) {
OFDate *old = fireDate;
fireDate = [[OFDate alloc]
initWithTimeIntervalSinceNow: interval];
[old release];
|
| ︙ | ︙ | |||
402 403 404 405 406 407 408 409 410 411 412 |
{
return isValid;
}
- (void)waitUntilDone
{
[condition lock];
[condition wait];
[condition unlock];
}
@end
| > > > > > > > > | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
{
return isValid;
}
- (void)waitUntilDone
{
[condition lock];
@try {
if (done) {
done = NO;
return;
}
[condition wait];
} @finally {
[condition unlock];
}
}
@end
|