Re: Mixing threaded and non-threaded

Поиск
Список
Период
Сортировка
От Scott Lamb
Тема Re: Mixing threaded and non-threaded
Дата
Msg-id 401AB9D4.8070907@slamb.org
обсуждение исходный текст
Ответ на Re: Mixing threaded and non-threaded  (Scott Lamb <slamb@slamb.org>)
Ответы Re: Mixing threaded and non-threaded  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Scott Lamb wrote:
> You could just do a pthread_sigmask() before and after the 
> pthread_setspecific() to guarantee that no SIGPIPE will arrive on that 
> thread in that time. I think it's pretty safe to assume that as long as 
> you're not doing a pthread_[gs]etspecific() on that same pthread_key_t, 
> it's safe.

Actually, thinking about this a bit more, that might not even be 
necessary. Is SIGPIPE-via-(read|write) synchronous or asynchronous? 
(I.e., is the SIGPIPE guaranteed to arrive during the offending system 
call?) I was thinking not, but maybe yes. I can't seem to find a 
straight answer. A lot of documents seem to confuse thread-directed and 
synchronous, when they're not quite the same thing. SIGALRM-via-alarm() 
is thread-directed but obviously asynchronous.



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

Предыдущее
От: Scott Lamb
Дата:
Сообщение: Re: Mixing threaded and non-threaded
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Question about indexes