Re: [PATCH] Add support for C++2a stop_token

2019-11-18 Thread Jonathan Wakely
On 15/11/19 23:43 +, Jonathan Wakely wrote: On 15/11/19 14:40 +, Jonathan Wakely wrote: On 15/11/19 14:38 +, Jonathan Wakely wrote: On 13/11/19 17:59 -0800, Thomas Rodgers wrote: + // TODO verify the standard requires this +#if 0 + // register another callback + bool

Re: [PATCH] Add support for C++2a stop_token

2019-11-15 Thread Jonathan Wakely
On 15/11/19 14:40 +, Jonathan Wakely wrote: On 15/11/19 14:38 +, Jonathan Wakely wrote: On 13/11/19 17:59 -0800, Thomas Rodgers wrote: + // TODO verify the standard requires this +#if 0 + // register another callback + bool cb3called{false}; + std::stop_callback scb3{stok, [&] +

Re: [PATCH] Add support for C++2a stop_token

2019-11-15 Thread Jonathan Wakely
On 15/11/19 14:38 +, Jonathan Wakely wrote: On 13/11/19 17:59 -0800, Thomas Rodgers wrote: + // TODO verify the standard requires this +#if 0 + // register another callback + bool cb3called{false}; + std::stop_callback scb3{stok, [&] +{ +

Re: [PATCH] Add support for C++2a stop_token

2019-11-15 Thread Jonathan Wakely
On 13/11/19 17:59 -0800, Thomas Rodgers wrote: + // TODO verify the standard requires this +#if 0 + // register another callback + bool cb3called{false}; + std::stop_callback scb3{stok, [&] +{ + cb3called = true; +

Re: [PATCH] Add support for C++2a stop_token

2019-11-14 Thread Thomas Rodgers
Tested x86_64-pc-linux-gnu, committed to trunk. Jonathan Wakely writes: > On 13/11/19 17:59 -0800, Thomas Rodgers wrote: >>+/** @file include/stop_token >>+ * This is a Standard C++ Library header. >>+ */ >>+ >>+#ifndef _GLIBCXX_STOP_TOKEN >>+#define _GLIBCXX_STOP_TOKEN >>+ >>+#if __cplusplus

Re: [PATCH] Add support for C++2a stop_token

2019-11-14 Thread Jonathan Wakely
On 13/11/19 17:59 -0800, Thomas Rodgers wrote: +/** @file include/stop_token + * This is a Standard C++ Library header. + */ + +#ifndef _GLIBCXX_STOP_TOKEN +#define _GLIBCXX_STOP_TOKEN + +#if __cplusplus >= 201703L This should be > not >= OK for trunk with that change.

Re: [PATCH] Add support for C++2a stop_token

2019-11-13 Thread Thomas Rodgers
The attached patch should be a complete implementation of C++20 stop_token, jthread, and changes to condition_variable_any which also addresses the comments on the previous patch. From 2cdaa367ed919b24f3bbb84d6f7391a350dce77b Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Wed, 13 Nov 2019

Re: [PATCH] Add support for C++2a stop_token

2019-10-24 Thread Jonathan Wakely
On 23/10/19 12:50 -0700, Thomas Rodgers wrote: Thomas Rodgers writes: Let's try this again. That's better, thanks :-) + * include/Makefile.am: Add header. +* include/Makefile.in: Regenerate. + * include/std/stop_token: New file. + * include/std/version

Re: [PATCH] Add support for C++2a stop_token

2019-10-23 Thread Thomas Rodgers
Thomas Rodgers writes: Let's try this again.From 23e1c9402cc15666d099fd61b58a0019181a9115 Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Tue, 22 Oct 2019 17:53:00 -0700 Subject: [PATCH] Add support for C++2a stop_token * include/Makefile.am: Add header. * include/Makefile.in

[PATCH] Add support for C++2a stop_token

2019-10-22 Thread Thomas Rodgers
0001-Add-support-for-C-2a-stop_token.patch Description: le patch