discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSOperation


From: Fred Kiefer
Subject: Re: NSOperation
Date: Wed, 24 Nov 2010 10:02:33 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.15) Gecko/20101026 SUSE/3.0.10 Thunderbird/3.0.10

I think that in GNUstep you have to create an auto release pool in your
start method. If this is different from what is needed on Cocoa we may
have to provide a pool in the _thread method of NSOperationQueue.

Fred

Am 23.11.2010 14:27, schrieb Scott Christley:
> Yes, I do that, take a look at the "main" method in the code I attached.  The 
> errors seem to be coming from the GNUstep NSOperationQueue code, as I can 
> spawn a thread to run the code without getting the error.
> 
> Scott
> 
> On Nov 23, 2010, at 1:36 AM, Sašo Kiselkov wrote:
> 
>> Concurrent operations run in separate threads, which don't automatically 
>> create autorelease pools (which are thread-local). You should enclose code 
>> which runs in a separate thread always in a new autorelease pool.
>>
>> --
>> Saso
>>
>> On 11/23/2010 12:44 AM, Scott Christley wrote:
>>>
>>> Hello,
>>>
>>> I'm trying to use NSOperationQueue to run a bunch of concurrent operations. 
>>>  I used the bit of sample code from the Apple documentation for the basic 
>>> structure, but the code prints some errors and hangs on GNUstep.  Does 
>>> anybody know what the problem might be?
>>>
>>> I get this from my program on GNUstep, it hangs after doing one operation.
>>>
>>>
>>> 2010-11-22 18:39:29.080 testOperation[3487] autorelease called without pool 
>>> for object (0x199b060) of class GSKVOInfo in thread <NSThread: 0x191c4e0>
>>> 2010-11-22 18:39:29.082 testOperation[3487] autorelease called without pool 
>>> for object (0x199b060) of class GSKVOInfo in thread <NSThread: 0x191c4e0>
>>> starting
>>> ending: 10000000001.000000
>>>
>>>
>>> I'm using gnustep-startup-0.25.0 on 64-bit ubuntu.  Threads seem to be 
>>> working just fine.
>>>
>>> thanks
>>> Scott




reply via email to

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