Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Feb 2005 12:19:11 +0000
From:      Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Best way to share data between threads
Message-ID:  <20050222121911.GA63213@dogma.freebsd-uk.eu.org>
In-Reply-To: <20050222063810.GA1784@gothmog.gr>
References:  <20050222055000.GA49525@dogma.freebsd-uk.eu.org> <20050222063810.GA1784@gothmog.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 22, 2005 at 08:38:11AM +0200, Giorgos Keramidas wrote:
: On 2005-02-22 05:50, Jonathon McKitrick <jcm@FreeBSD-uk.eu.org> wrote:
: >
: > Hi all,
: > I'm porting some libraries from Win32 to BSD/Linux.  In the original
: > code, I receive a Windows event with an attached COM object.
: >
: > Under *nix, what is the best way to copy this?  A message, followed
: > by accessing shared memory between threads?
: 
: Does the message really have to be shared across many threads?  I'm
: only asking because thread-specific message queues are not that hard
: to build with pthreads.  You will only need a per-thread queue to hold
: messages and a master thread that 'dispatches' messages to the proper
: thread/queue.

Well, there will be a data acquisition thread, that when finished, will need
to signal the main processing thread that a new data object has arrived.

Jonathon McKitrick
--
My other computer is your Windows box.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050222121911.GA63213>