OSDN Git Service

* testsuite/performance/30_threads/future/polling.cc: Adjust.
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2012 21:47:44 +0000 (21:47 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 Apr 2012 21:47:44 +0000 (21:47 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186360 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/performance/30_threads/future/polling.cc

index 8e9dcd2..cd24fb1 100644 (file)
@@ -1,5 +1,9 @@
 2012-04-11  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
+       * testsuite/performance/30_threads/future/polling.cc: Adjust.
+
+2012-04-11  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
        PR libstdc++/52591
        * include/bits/stl_vector.h (vector::operator=(vector&&)): Dispatch
        to _M_move_assign depending on whether allocator is moved.
index 83fde27..26cf632 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -22,7 +22,7 @@
 
 inline bool is_ready(std::shared_future<void>& f)
 {
-  return f.wait_for(std::chrono::microseconds(1));
+  return f.wait_for(std::chrono::microseconds(1)) == std::future_status::ready;
 }
 
 void poll(std::shared_future<void> f)