Thread programming
Thread programming
- Subject: Thread programming
- From: Mahaboob <email@hidden>
- Date: Thu, 13 Nov 2008 10:08:37 +0530
- Thread-topic: Thread programming
Hi,
I'm working on a mailing application using Pantomime framework. I used one
method to send email using SMTP, which calls a method
[smtp connectInBackgroundAndNotify]; which automatically calls the
connection established method, which intern calls
serviceInitialized:
messageSent: and
connectionTerminated: methods. It is working fine.
Now I need to restrict the time between emails to send. So I replaced the
method with a thread like:
[NSThread detachNewThreadSelector:@selector(sendEmail:) toTarget:self
withObject:nil];
And
- (void) sendEmail: (NSConnection *) connection
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//here goes the same code of lines in the above method.
[pool release];
}
When I'm calling the thread, it invokes but not going to
connectionEstablished and other methods.
Where I got wrong? How can I solve this?
Thanks in advance.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden