• 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
Re: Background threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background threads


  • Subject: Re: Background threads
  • From: "Al Ameen Shah Ahamed Shah" <email@hidden>
  • Date: Thu, 17 Oct 2002 18:59:37 +0530

thank you for the reply.
My application is not multithreaded before i call "waitForDataInBackgroundAndNotify"
This was verified by putting one [NSThread isMultiThreaded] before making the call.
It returns NO.

However waitForDataInBackgroundAndNotify works fine. My Notification
method gets invoked upon data arrival and everything is fine.

regards,
ameen.

On Thursday, October 17, 2002, at 06:26 PM, Andreas Mayer wrote:

Am Donnerstag, 17.10.02 um 13:36 Uhr schrieb Al Ameen Shah Ahamed Shah:

Does this mean background threads wont post this notification or does
it mean waitForDataInBackgroundAndNotify does not create a thread..please help..

It probably means that your application is already multi threaded.

waitForDataInBackgroundAndNotify does create a new thread. You will want to register for a NSFileHandleReadCompletionNotification to receive the data.

Beware that if you read from something other than a actual file (i.e. device or socket) there might be a problem if you want to close the file and the read thread is still running (looks like it does not return on close).


bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Background threads (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: A CFStringRef that throws EXC_BAD_ACCESS
  • Next by Date: Re: A CFStringRef that throws EXC_BAD_ACCESS
  • Previous by thread: Re: Background threads
  • Next by thread: Re: Declarations near usage
  • Index(es):
    • Date
    • Thread