Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()
От | Tom Lane |
---|---|
Тема | Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely() |
Дата | |
Msg-id | 696.1590419679@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely() (Joe Conway <mail@joeconway.com>) |
Ответы |
Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()
|
Список | pgsql-hackers |
Joe Conway <mail@joeconway.com> writes: > On 5/25/20 9:52 AM, Tom Lane wrote: >> There was some question as to what (if anything) to do with the Windows >> version of CHECK_FOR_INTERRUPTS. Have you resolved that? > Two questions. > First, as I understand it, unlikely() is a gcc thing, so it does nothing at all > for MSVC builds of Windows, which presumably are the predominate ones. The > question here is whether it is worth doing at all for Windows builds. On the > other hand it seems unlikely to harm anything, so I think it is reasonable to > leave the patch as is in that respect. Perhaps I'm an optimist, but I think that eventually we will figure out how to make unlikely() work for MSVC. In the meantime we might as well let it work for gcc-on-Windows builds. > The second question is whether UNBLOCKED_SIGNAL_QUEUE() warrants its own > likely() or unlikely() wrapper. I have no idea, but we could always add that > later if someone deems it worthwhile. I think that each of those tests should have a separate unlikely() marker, since the whole point here is that we don't expect either of those tests to yield true in the huge majority of CHECK_FOR_INTERRUPTS executions. regards, tom lane
В списке pgsql-hackers по дате отправления: