Re: BSD sockets calls on OSX Tiger and thread safety
Re: BSD sockets calls on OSX Tiger and thread safety
- Subject: Re: BSD sockets calls on OSX Tiger and thread safety
- From: Vincent Lubet <email@hidden>
- Date: Wed, 18 Oct 2006 10:29:37 -0700
To illustrate what Dave said, if you call send() on the same socket
file descriptor from 2 threads you have no guarantee on what data
will be sent first. If ordering is important your program, need to
provide your own synchronization mechanism.
Sending from 2 threads on 2 distinct file descriptors is not a
problem (except if the 2 file descriptors are logically related for a
specific application but that's rather rare...)
Vincent
On Oct 18, 2006, at 8:46 AM, Dave Zarzycki wrote:
The APIs are thread safe.
But like all thread safe APIs, one can still use them in an unsafe
manner.
davez
On Oct 18, 2006, at 8:38 AM, email@hidden wrote:
Hello, all ...
How thread-safe is OSXs' BSD sockets implementation? Can I call
select(), recv(), send(), socket(), setsockopt(), etc. from
multiple threads simultaneously without locking, or are there
things I need to be aware of?
Regards,
John
Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden