[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/iceyu/cpp-taskflow/master/unittest/spmc_queue.cpp [Back]  [Original]

// 2019/05/15 - modified by Tsung-Wei Huang
//  - temporarily disable executor test
//
// 2019/04/11 - modified by Tsung-Wei Huang
//  - renamed threadpool to executor
//
// 2019/02/15 - modified by Tsung-Wei Huang
//  - modified batch tests (reference instead of move)  
//
// 2018/12/04 - modified by Tsung-Wei Huang
//  - replaced privatized executor with work stealing executor
//
// 2018/12/03 - modified by Tsung-Wei Huang
//  - added work stealing queue tests
//
// 2018/11/29 - modified by Chun-Xun Lin
//  - added batch tests
//
// 2018/10/04 - modified by Tsung-Wei Huang
//  - removed binary tree tests
//  - removed spawn/shutdown tests
//  - removed siltne_async and async tests
//  - added emplace test
//  - adopted the new thread pool implementation
//
// 2018/09/29 - modified by Tsung-Wei Huang
//  - added binary tree tests
//  - added worker queue tests
//  - added external thread tests
//  - refactored executor tests
// 
// 2018/09/13 - modified by Tsung-Wei Huang & Chun-Xun
//  - added tests for ownership
//  - modified spawn-shutdown tests
//
// 2018/09/10 - modified by Tsung-Wei Huang
//  - added tests for SpeculativeExecutor
//  - added dynamic tasking tests
//  - added spawn and shutdown tests
//
// 2018/09/02 - created by Guannan
//  - test_silent_async
//  - test_async
//  - test_wait_for_all

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#include 
#include 

#include 
//#include 

// ============================================================================
// WorkStealingQueue tests
// ============================================================================

// Procedure: wsq_test_owner
void wsq_test_owner() {

  int64_t cap = 2;
  
  tf::WorkStealingQueue queue(cap);
  std::deque gold;

  REQUIRE(queue.capacity() == 2);
  REQUIRE(queue.empty());

  for(int i=2; i

Web Proxy Viewer  |  New URL  |  Original Page