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...
Quenelle asked 24/5, 2012 at 15:4

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

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...
Salvidor asked 30/3, 2012 at 2:37

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...

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...

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...

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 ...
Neoplasticism asked 3/3, 2011 at 4:34

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...
Overwinter asked 6/2, 2011 at 5:36

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...
Professed asked 3/2, 2011 at 21:56

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...

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...
Gibson asked 12/10, 2009 at 21:35

© 2022 - 2024 — McMap. All rights reserved.