Re: Condition variable live lock
| От | Tom Lane |
|---|---|
| Тема | Re: Condition variable live lock |
| Дата | |
| Msg-id | 15204.1515166090@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Condition variable live lock (Thomas Munro <thomas.munro@enterprisedb.com>) |
| Ответы |
Re: Condition variable live lock
|
| Список | pgsql-hackers |
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> Could we install the sentinel and pop the first entry at the same
> time, so that we're not adding an extra spinlock acquire/release?
Hm, maybe. Other ideas in that space:
* if queue is empty when we first acquire the spinlock, we don't
have to do anything at all.
* if queue is empty after we pop the first entry, we needn't bother
installing our sentinel, just signal that proc and we're done.
It's a question of how complicated you're willing to make this
logic, and whether you trust that we'll be able to test all the
code paths.
regards, tom lane
В списке pgsql-hackers по дате отправления: