public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* std::launch::async implementation
@ 2023-12-27 11:32 Taras Sich
  2023-12-27 19:27 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Taras Sich @ 2023-12-27 11:32 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

Dear GCC team,

Could you please clarify whether the implementation of std::launch::async
uses a thread pool?
I'm particularly interested in the implementation for Fedora 33.
Have not found the behavior description in the documentation.

Best regards,
Taras

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: std::launch::async implementation
  2023-12-27 11:32 std::launch::async implementation Taras Sich
@ 2023-12-27 19:27 ` Jonathan Wakely
  2023-12-27 19:28   ` Taras Sich
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2023-12-27 19:27 UTC (permalink / raw)
  To: Taras Sich; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

On Wed, 27 Dec 2023, 11:33 Taras Sich via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Dear GCC team,
>
> Could you please clarify whether the implementation of std::launch::async
> uses a thread pool?
>

It does not, because that's not conforming. The standard says the function
has to be run in a new thread, not a reused one. The difference is
observable by using thread-specific variables.



I'm particularly interested in the implementation for Fedora 33.
> Have not found the behavior description in the documentation.
>
> Best regards,
> Taras
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: std::launch::async implementation
  2023-12-27 19:27 ` Jonathan Wakely
@ 2023-12-27 19:28   ` Taras Sich
  0 siblings, 0 replies; 3+ messages in thread
From: Taras Sich @ 2023-12-27 19:28 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Thank you for the clarification!

On Wed, 27 Dec 2023 at 20:27, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:

>
>
> On Wed, 27 Dec 2023, 11:33 Taras Sich via Gcc-help, <gcc-help@gcc.gnu.org>
> wrote:
>
>> Dear GCC team,
>>
>> Could you please clarify whether the implementation of std::launch::async
>> uses a thread pool?
>>
>
> It does not, because that's not conforming. The standard says the function
> has to be run in a new thread, not a reused one. The difference is
> observable by using thread-specific variables.
>
>
>
> I'm particularly interested in the implementation for Fedora 33.
>> Have not found the behavior description in the documentation.
>>
>> Best regards,
>> Taras
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-27 19:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-27 11:32 std::launch::async implementation Taras Sich
2023-12-27 19:27 ` Jonathan Wakely
2023-12-27 19:28   ` Taras Sich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).