nsthread Questions
1
Solved
I am using (and am required to use) a third-party framework to which I do not have source. The third-party framework handles creating an authenticated client/server connection and hands back a pair...
1
Solved
I wrote a function which returns an object. But it is a function which takes data from web.So NSthread is used to call the function.
NSThread* pageThread = [[NSThread alloc]initWithTarget:self se...
Tachycardia asked 15/4, 2012 at 11:5
2
Solved
RetainCount == BAD
retainCount is taboo, unreliable, unpredictable, and in general shouldn't be used. I don't use it anywhere in my code, but I have seen it in one class that I use in an interesti...
Refer asked 5/4, 2012 at 16:3
4
Solved
How do I create an NSThread that isn't the main thread without performing a selector immediately
I want to create a worker thread that isn't the main thread so I can call ...
[self performSelector:@selector(doStuff) OnThread:self.myWorkerThread withObject:nil];
... in a bunch of locations i...
2
Solved
I am working on my first iOS app, and have run in the first snag I have not been able to find a good answer for.
The problem: I have a custom UIGestureRecognizer and have it all wired up correctly...
Perversity asked 27/12, 2011 at 2:48
2
Solved
why do I get "wait_fences: failed to receive reply" for this code? Is it the way I'm using notification to communicate back to the main thread?
#import "ViewController.h"
@implementation ViewCont...
Lucky asked 7/11, 2011 at 5:19
2
Solved
Is it ok to use of a notification to communication back to the main thread of an IOS app? (cf performSelectorOnMainThread). That is, there are are there any gottcha's for this purpose?
Background
...
Zebrawood asked 7/11, 2011 at 4:13
1
Solved
i am trying to use NSThreads with ARC in 4.3.5. With iOS 5 everything works perfect, but if i try it on a older iOS like 4.3 its leaking. Normally i would use a Autoreleasepool for NSThreads but si...
Legislate asked 22/8, 2011 at 14:59
2
Solved
When you use threads, do you have any preferences? In general rule, to use any of these techniques :
create a new thread manually and use the run loop
use NSOperationQueue
or use Grand Central D...
Kweisui asked 22/8, 2011 at 10:23
2
Solved
They seem to perform a reasonably similar task: launching a new thread that performs that selector quickly and easily. But are there any differences? Maybe with regards to memory management?
Tingle asked 30/6, 2011 at 18:34
3
Solved
I created some test code for NSThread and Grand Central Dispatch (GCD):
- (void)doIt:(NSNumber *)i
{
sleep(1);
NSLog(@"Thread#%i", [i intValue]);
}
- (IBAction)doWork:(id)sender
{
for (int i ...
Cherry asked 13/4, 2011 at 18:1
3
Solved
I want to ask some simple but important questions regarding iPhone development. If we have to perform tasks in the background and when the background tasks are completed we will update the UI, for ...
1
Solved
I'm just trying to close an NSPanel after a couple second delay, but I can't get my NSTimer to start. It will fire if I explicitly call the fire method on it, but it will never go by itself. Here's...
1
Solved
My model class has to get some data from the internet. So I decided to run it on another thread so the ui doesn't freeze.
So when an object wants some data it first asks the model using a method of...
1
Solved
Goal is to "launch a spinner graphic at start of viewWillAppear that loads data before showing the tableview" so the user doesn't wonder why there's a delay before seeing the table. I.e. a UIActivi...
Southerner asked 21/1, 2011 at 10:8
3
Solved
Does every thread have to have its own pool? I am writing an iPhone app which uses threads. If I do not put a pool on a thread it complains abut leaking.
What I wanted to do was to store some obj...
Strobila asked 28/12, 2010 at 16:45
2
Solved
In Obj-C, what does it mean in simple terms;
"CoreData is not thread safe"
OR in general what is "not thread safe" ?
Desrosiers asked 28/12, 2010 at 11:4
2
Solved
I created a sub-thread using NSThread in main thread
NSThread *newThread = [[NSThread alloc] initWithTarget:self selector:@selector(MyThread:) object:timer];
5 sec later,i used [newThread cancel]...
Parodist asked 7/7, 2010 at 1:41
2
Solved
Currently I'm using NSThread to cache images in another thread.
[NSThread detachNewThreadSelector:@selector(cacheImage:) toTarget:self withObject:image];
Alternately:
[self performSelectorInBac...
Geerts asked 15/6, 2010 at 0:24
1
Solved
I would like to see if I can make a "search as you type" implementation, against a web service, that is optimized enough for it to run on an iPhone.
The idea is that the user starts typing a word;...
Afebrile asked 15/5, 2010 at 14:13
2
I am developing a RSS reader which uses a NSMutableArray (_stories) to store the contents of the RSS Feed. This array is being used by two different threads in the application and may be accessed s...
Donndonna asked 9/11, 2009 at 19:48
2
Solved
I want to schedule a thread after a thread completion.
Is it possible ? How?
For example ( to specify my need )
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
...
Leuco asked 28/10, 2009 at 19:45
1
Solved
I have a worker thread that I want to do one bit of its task, then pause & wait for the "ok, continue" command from another thread, then pause & wait, etc.
The use case is: the controlling...
© 2022 - 2024 — McMap. All rights reserved.