diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index e5ac138..164294f 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -15034,7 +15034,7 @@ which handles spawning or reusing a thread without exposing raw threads to your ##### Note Unfortunately, `std::async` is not perfect. For example, it doesn't use a thread pool, -which means that it may fail due to resource exhaustion, rather than queueing up your tasks +which means that it may fail due to resource exhaustion, rather than queuing up your tasks to be executed later. However, even if you cannot use `std::async`, you should prefer to write your own `future`-returning factory function, rather than using raw promises. @@ -15050,7 +15050,7 @@ at avoiding raw `std::thread` management. std::thread t1([p1 = std::move(p1)]() mutable { p1.set_value(read_value("v1.txt")); }); - t1.detach(); + t1.detach(); // evil std::packaged_task pt2(read_value, "v2.txt"); std::future f2 = pt2.get_future(); @@ -19209,6 +19209,8 @@ or even an occasional "`string`s cannot be compared with `==`). The solution is to explicitly `#include `: +##### Example, good + #include #include using namespace std; diff --git a/scripts/hunspell/isocpp.dic b/scripts/hunspell/isocpp.dic index 8be01ec..0b2e89e 100644 --- a/scripts/hunspell/isocpp.dic +++ b/scripts/hunspell/isocpp.dic @@ -632,6 +632,7 @@ webby Webcolor webcolors WG21 +WorkQueue 'widen' x1 x2