Re: Threading in BGWorkers (!) - Mailing list pgsql-hackers

From James Sewell
Subject Re: Threading in BGWorkers (!)
Date
Msg-id CAANVwEuK9bUjHmj2xFHbA1T07eYQLGmukE0LcA-O7ky=cKXY6g@mail.gmail.com
Whole thread Raw
In response to Re: Threading in BGWorkers (!)  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Threading in BGWorkers (!)
Re: Threading in BGWorkers (!)
List pgsql-hackers
Using multithreading in bgworker is possible if you do not use any
Postgres runtime inside thread procedures or do it in exclusive critical
section.
It is not so convenient but possible. The most difficult thing from my
point of view is error reporting.

Happy to be proved wrong, but I don't think this is correct. 

PostgreSQL can call sigprocmask() in your BGWorker whenever it wants, and  "The use of sigprocmask() is unspecified in a multithreaded process" [1]




The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: Threading in BGWorkers (!)
Next
From: James Sewell
Date:
Subject: Re: Threading in BGWorkers (!)