Re: [HACKERS] Semaphores

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Semaphores
Дата
Msg-id 200310241549.h9OFn6u01994@candle.pha.pa.us
обсуждение исходный текст
Ответ на Semaphores  (Nailah Ogeer <ogeer@cs.queensu.ca>)
Список pgsql-general
Nailah Ogeer wrote:
> Hi all,
> Just wanted to know how postgres handles semaphores. Was hoping that i can
> can use the locks defined in lwlock.h and lwlock.c . If i create a new
> lock and then use LockAcquire and
> LockRelease when I want a process to start and stop will this work?

Uh, well, we usually try to get a lock via a test-and-set assembly
language call into shared memory, and if we fail, we then get a
semaphore and wait for someone to wake us up.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-general по дате отправления:

Предыдущее
От: Network Administrator
Дата:
Сообщение: Re: HTML generation with PL/PgSQL
Следующее
От: Scott Chapman
Дата:
Сообщение: [OT] Choosing a scripting language.