Re: [HACKERS] Thread-safe queueing?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Holloway <mtsinc(at)southeast(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Thread-safe queueing?
Date: 1999-11-13 15:14:21
Message-ID: 431.942506061@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tim Holloway <mtsinc(at)southeast(dot)net> writes:
> I need to create a cross-process producer/consumer data queue
> (e.g. singly-linked list). That is - Processes A, B, and C add nodes
> to a controlled list and process D removes them. Not sure if the
> creation of the nodes would be best done by the producers or
> consumers, but destruction would have to be done by the consumer, as
> the producers don't wait for processing. For optimal results, the
> consumer process should sleep until item(s) are added to its queue.

> Query: within the existing backend framework, what's the best way to
> accomplish this?

More context, please. What are you trying to accomplish? Is this
really a communication path between backends (and if so, what backend
code needs it?), or are you trying to set up a queue between SQL
clients? How much data might need to be in the queue at one time?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-11-13 15:41:02 Re: [HACKERS] Backend build fails in current
Previous Message Tom Lane 1999-11-13 14:57:08 Re: [HACKERS] RFC: create/alter user extension