• 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: Best way to push action from 1 thread to another?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to push action from 1 thread to another?


  • Subject: Re: Best way to push action from 1 thread to another?
  • From: email@hidden
  • Date: Wed, 08 May 2002 13:09:13 -0700

Dave Fayram wrote:
|I'm currently using a thread to loop on a pcap socket, which then pushes
|the data pcap returns through an NSPort to get it back into the thread
|that the AppKit NSRunLoop resides on. This works, but I'm curious if
|this is the Best Way(tm) to go about pushing data from one thread to
|the next.

If the threads are both in a single process, why not just stash the data into a variable that both threads access? (You'll need to use an NSLock to keep the threads from stepping on each other, but that's still a lot less overhead than what you're doing now.)

Glen Fisher
_______________________________________________
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: 
 >Best way to push action from 1 thread to another? (From: Dave Fayram <email@hidden>)

  • Prev by Date: Best way to push action from 1 thread to another?
  • Next by Date: Redirect the output of a *NIX log file
  • Previous by thread: Best way to push action from 1 thread to another?
  • Next by thread: Re: Best way to push action from 1 thread to another?
  • Index(es):
    • Date
    • Thread