the default pool thread number is thread hw concurrency
This commit is contained in:
@@ -2086,7 +2086,7 @@ namespace nana{ namespace widgets
|
||||
|
||||
void text_editor::copy() const
|
||||
{
|
||||
//Stops copying text if the text_editor is masked.
|
||||
//Disallows copying text if the text_editor is masked.
|
||||
if (mask_char_)
|
||||
return;
|
||||
|
||||
|
||||
@@ -351,10 +351,17 @@ namespace threads
|
||||
}container_;
|
||||
};//end class impl
|
||||
|
||||
pool::pool()
|
||||
: impl_(new impl(4))
|
||||
#ifndef STD_THREAD_NOT_SUPPORTED
|
||||
pool::pool(unsigned thread_number)
|
||||
: impl_(new impl(thread_number ? thread_number : std::thread::hardware_concurrency()))
|
||||
{
|
||||
}
|
||||
#else
|
||||
pool::pool(unsigned thread_number)
|
||||
: impl_(new impl(0))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
pool::pool(pool&& other)
|
||||
: pool()
|
||||
@@ -362,11 +369,6 @@ namespace threads
|
||||
std::swap(impl_, other.impl_);
|
||||
}
|
||||
|
||||
pool::pool(std::size_t thread_number)
|
||||
: impl_(new impl(thread_number))
|
||||
{
|
||||
}
|
||||
|
||||
pool& pool::operator=(pool&& other)
|
||||
{
|
||||
if(this != &other)
|
||||
|
||||
Reference in New Issue
Block a user