Hi, please help me trying to understand the code below which try to
demonstrate op queuing behaviors. Questions are in the comments.
#include
#import
@interface MyOp : NSOperation
{
@public
NSString *name;
int sec;
}
@end
static MyOp *a;
static MyOp *b;
static MyOp *c;
@implem
- (void) addDependency: (NSOperation *)op
{
if (NO == [op isKindOfClass: [self class]])
{
...
Should [self class] be [NSOperation class] ? but why bother checking at all?
___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailma
- (void) observeValueForKeyPath: (NSString *)keyPath
...
while ((op = [en nextObject]) != nil)
{
if (NO == [op isReady]) <-- should this be isFinished ?
break;
}
___
Gnustep-dev mailing list
Gnustep-dev@gnu.org
htt
When NSOperation finish in -_finish
it didChangeValueForKey:@"isFinished" (525)
in NSKeyValueObserving.m:1739 it [pathInfo notifyForKey: aKey
ofInstance: [info instance] prior: NO];
which make it be removed from the op queue and deallocated at NSOperation.m:902
and crash at NSKeyValueObserving.m:17
On 4 Mar 2011, at 22:20, Banlu Kemiyatorn wrote:
> When NSOperation finish in -_finish
> it didChangeValueForKey:@"isFinished" (525)
> in NSKeyValueObserving.m:1739 it [pathInfo notifyForKey: aKey
> ofInstance: [info instance] prior: NO];
> which make it be removed from the op queue and deallocat