Best way to push action from 1 thread to another?
Best way to push action from 1 thread to another?
- Subject: Best way to push action from 1 thread to another?
- From: Dave Fayram <email@hidden>
- Date: Wed, 8 May 2002 12:27:08 -0700
Hi,
Well I ended up using notifications in my network monitor. So now
I've got another "efficiency" question. 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. I'm
almost inclined to write a more efficient
pthreads solution personally. There is a lot of overhead with using the
mach port to do it (and not just in using
the port, also in stuff like archiving the desired objects as data to
send via the port).
So probably the best thing I can ask as a followup is, is there a
way to send notifications such that
they occur in a different thread? Maybe some magical thing I'm
overlooking? It would seem to me a lot
of developers would want this, since AppKit isn't thread safe...
- Dave "Paradox" Fayram
My ElGamal and DSA keys can be found at:
http://zero.atomictrain.net:88/~paradox/pgpkey.html
"Not everyone finds Drag'n'Drop as intuitive as they should."
_______________________________________________
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.