discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOperationQueue - Killed after 40 seconds


From: Zettifour
Subject: NSOperationQueue - Killed after 40 seconds
Date: Sat, 22 Mar 2014 03:00:12 -0700 (PDT)

I want to migrate my OS X project to Linux (Ubuntu) but I run in some trouble
with parallel background task. The app is killed after 30-40 seconds
(message on the terminal: Killed). During running the GUI responses very
slow and after some seconds the GUI fades out from grey to dark grey. My app
processes a big number of csv files. ARC is enabled. Here is the compressed
code:

...
[importFilesButton setAction:@selector(importFiles)];
...

- (void) importFiles {

     NSOperationQueue *queue = [[NSOperationQueue alloc] init];
     NSMutableArray *taskArray = [[NSMutableArray alloc]init];
     ...
     for ( File *file in files ) {
     ...
          NSInvocationOperation *operation = [[NSInvocationOperation alloc]
initWithTarget:self selector:@selector(importFileTask:)
object:importFileTaskParameter];
          [taskArray addObject:operation];
...
     }

     [queue addOperations:taskArray waitUntilFinished:YES];
}

On OS X/Xcode  no problem.





--
View this message in context: 
http://gnustep.8.n7.nabble.com/NSOperationQueue-Killed-after-40-seconds-tp37044.html
Sent from the GNUstep - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]