• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Thread programming
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Thread programming
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: project organization and framework linking
  • Next by Date: Re: Thread programming
  • Previous by thread: Re: Core Data search box: how to preserve selection while
  • Next by thread: Re: Thread programming
  • Index(es):
    • Date
    • Thread