2009.09.10 Maxim Khiszinsky reset() function added
*/
+#include <thread>
#include <cds/compiler/backoff.h>
-#include <cds/details/std/thread.h>
#include <cds/details/std/chrono.h>
namespace cds {
//@cond
void operator ()()
{
- cds_std::this_thread::yield();
- //OS::yield();
+ std::this_thread::yield();
}
template <typename Predicate>
//@cond
void operator()() const
{
- cds_std::this_thread::sleep_for( duration_type( m_nTimeout ));
+ std::this_thread::sleep_for( duration_type( m_nTimeout ));
}
template <typename Predicate>
for ( unsigned int i = 0; i < m_nTimeout; i += 2 ) {
if ( pr() )
return true;
- cds_std::this_thread::sleep_for( duration_type( 2 ));
+ std::this_thread::sleep_for( duration_type( 2 ));
}
return false;
}
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_DETAILS_STD_THREAD_H
-#define __CDS_DETAILS_STD_THREAD_H
-
-//@cond
-
-#include <cds/details/defs.h>
-
-#ifdef CDS_CXX11_STDLIB_THREAD
-# include <thread>
- namespace cds_std {
- using std::thread;
- namespace this_thread = std::this_thread;
- }
-#else
-# include <boost/thread/thread.hpp>
- namespace cds_std {
- using boost::thread;
- namespace this_thread = boost::this_thread;
- }
-#endif
-
-//@endcond
-
-#endif // #ifndef __CDS_DETAILS_STD_THREAD_H
#define _CDS_URCU_DISPOSE_THREAD_H
#include <memory>
-#include <cds/details/std/thread.h>
+#include <thread>
#include <cds/details/std/mutex.h>
#include <cds/details/std/condition_variable.h>
#include <cds/details/aligned_type.h>
typedef Buffer buffer_type ; ///< Buffer type
private:
//@cond
- typedef cds_std::thread thread_type;
- typedef cds_std::mutex mutex_type;
- typedef cds_std::condition_variable condvar_type;
+ typedef std::thread thread_type;
+ typedef cds_std::mutex mutex_type;
+ typedef cds_std::condition_variable condvar_type;
typedef cds_std::unique_lock< mutex_type > unique_lock;
class dispose_thread_starter: public thread_type
<ClInclude Include="..\..\..\cds\details\numtraits.h" />\r
<ClInclude Include="..\..\..\cds\details\static_functor.h" />\r
<ClInclude Include="..\..\..\cds\details\std\condition_variable.h" />\r
- <ClInclude Include="..\..\..\cds\details\std\memory.h" />\r
<ClInclude Include="..\..\..\cds\details\std\mutex.h" />\r
- <ClInclude Include="..\..\..\cds\details\std\thread.h" />\r
<ClInclude Include="..\..\..\cds\details\std\chrono.h" />\r
<ClInclude Include="..\..\..\cds\gc\all.h" />\r
<ClInclude Include="..\..\..\cds\gc\exception.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\deque_stat.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\details\std\memory.h">\r
- <Filter>Header Files\cds\details\std</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\intrusive\cuckoo_set.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\cds\details\std\mutex.h">\r
<Filter>Header Files\cds\details\std</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\details\std\thread.h">\r
- <Filter>Header Files\cds\details\std</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\details\std\chrono.h">\r
<Filter>Header Files\cds\details\std</Filter>\r
</ClInclude>\r