Re: Best way to push action from 1 thread to another?
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.