Re: Threads vs Processes

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: Threads vs Processes
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4962017@m0114.s-mxs.net
обсуждение исходный текст
Список pgsql-hackers
> "When the address-of operator is applied to a thread-local variable, it
> is evaluated at run-time and returns the address of the current thread's
> instance of that variable. An address so obtained may be used by any
> thread. When a thread terminates, any pointers to thread-local variables
> in that thread become invalid."

Bummer, I would have thought one advantage of using TLS must surely be memory
protection ? So the only for pg useful usage for TLS seems to be "__declspec(thread)"
and "__declspec(thread) static" (both for stuff that do not need runtime
preinitialization).

Maybe the techniques of electric fence could be used for protecting the shmem
at least a little bit.

Andreas

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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: pg_get_triggerdef pretty printing
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: pg_get_triggerdef pretty printing