Re: sched_yield()
От | Bruce Momjian |
---|---|
Тема | Re: sched_yield() |
Дата | |
Msg-id | 199803220401.XAA02645@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: sched_yield() (Mattias Kregert <matti@algonet.se>) |
Список | pgsql-hackers |
> Perhaps we should enable sched_yield() for every OS except for... well, > what's the > name of that OS which does not have sched_yield()... FreeBSD ;) > > After all, sched_yield() is five years old. Any reasonable OS should > have it. Gee, I just checked and BSDI has it. However, it appears to work only on threaded applications: #include <pthread.h> ... If other threads are ready to run, the sched_yield() function forces the current thread to suspend itself temporarily and let them execute. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-hackers по дате отправления: