[omniORB] communicating via ordinary socket within a omniORB
server
Luke Deller
ldeller at xplantechnology.com
Thu Nov 25 09:56:48 GMT 2004
Gerd Schmitt wrote:
> I have a omniORB server which also needs to read and
> write from an ordinary socket. I need to do this
> within a separate thread.
>
> Can I simply use a pthread for this, or would this
> conflict with omniORB (i.e. because of thread unsafe
> system calls)?
> If so, how would I synchronise the access?
How about using an omnithread rather than a pthread? The omnithread
library is portable to some non-posix systems too, and it is the thread
library used by omniORB. It's quite easy to use, see docs here:
http://omniorb.sourceforge.net/omni40/omnithread.html
Having said that, using a pthread should be fine because the omnithread
library is basically a c++ wrapper for pthreads on posix systems.
Whichever library you use, the socket system calls are thread safe.
Regards,
Luke.
More information about the omniORB-list
mailing list