Stefan Bidigaray wrote: > It would really help if I attached the file... >
I don't understand the general concept here, so just a few detail comments on the code itself. Hiding the implementation details in the header is a good thing, but it makes the code in the implementation harder to read. This could be improved by using local variables (or even Macros). For example - (BOOL) pause { NSConditionLock *lock = (NSConditionLock*)_private[2]; if ([lock condition] == SOUND_SHOULD_PAUSE) { return NO; } if ([lock tryLock] == NO) { return NO; } [lock unlockWithCondition: SOUND_SHOULD_PAUSE]; return YES; } When releasing the conditional lock, you should rather destroy it, as it could otherwise just be reused, although it has been freed. Shouldn't the condition of the while loop read something like this? while ((!_shouldExit) && (bytesRead > 0) && success) _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev