Обсуждение: pgsql: Properly call strerror() in thread test; add comments.

Поиск
Список
Период
Сортировка

pgsql: Properly call strerror() in thread test; add comments.

От
Bruce Momjian
Дата:
Properly call strerror() in thread test;  add comments.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5473f283f501ff9f5e38e89d3a2e89f738a7e76f

Modified Files
--------------
src/test/thread/thread_test.c |    9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)


Re: pgsql: Properly call strerror() in thread test; add comments.

От
Peter Geoghegan
Дата:
Why have you removed the GetLastError() call? MSDN says that "The
return value is the calling thread's last-error code".

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

Re: pgsql: Properly call strerror() in thread test; add comments.

От
Bruce Momjian
Дата:
Peter Geoghegan wrote:
> Why have you removed the GetLastError() call? MSDN says that "The
> return value is the calling thread's last-error code".

True, but we check it also after all the threads have completed setting
their error values.  I removed it because Unix does not have such a
check and it seemed logical to do the check only after we were done.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +