From b68776cc2acda4aa979b7381ddfffd246a00e483 Mon Sep 17 00:00:00 2001 From: Ryou Ezoe Date: Wed, 2 Mar 2016 19:02:02 +0900 Subject: [PATCH] aquire number of thread to create from hardware_concurrency() --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 6ebda58..7e425f2 100644 --- a/main.cpp +++ b/main.cpp @@ -65,7 +65,7 @@ void square_am_signal(float time, float frequency) int main() { - for ( unsigned i = 0 ; i < 8 ; ++i ) + for ( unsigned i = 0 ; i < std::thread::hardware_concurrency() ; ++i ) { std::thread t( boost_song ) ; t.detach() ;