• 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: Wait until task is finished?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wait until task is finished?


  • Subject: Re: Wait until task is finished?
  • From: p3consulting <email@hidden>
  • Date: Mon, 23 Jun 2003 23:40:51 +0200

Is it possible to start an NSTask, but then have the original program wait until the task is finished before continuing on to run along the original path?

Start my task. [myTask launch];
Wait until task is done. ???
Do something else. NSLog(@"Foo");

I tried something like [myTask waitUntilExit], but this just locked up the rest of the program even though the task ran. Do I need to add some loop?


Well if you launch the NSTask from your main thread the only way not to block is polling
but you can launch the NSTask from another thread

Pascal Pochet

P3 Consulting
email@hidden
http://www.p3-consulting.net
_______________________________________________
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.

  • Prev by Date: Re: Xcode...
  • Next by Date: cfsocket / upd monitoring
  • Previous by thread: Wait until task is finished?
  • Next by thread: Re: Wait until task is finished?
  • Index(es):
    • Date
    • Thread