Skip to content

Get stuck when running example with threadpool 1024 #3

@WanpengQian

Description

@WanpengQian

change example.cpp pool size to 1024

using namespace std;
	nThread::CThreadPool tp{1024};
	queue<nThread::CThreadPool::thread_id> que;

and running the test. get stuck as following output

add - thread 752 wait 3 sec
add_and_detach - thread 1024 wait 1 sec
add - thread 762 wait 0 sec
add_and_detach - thread 1024 wait 2 sec
add_and_detach - thread 1024 wait 3 sec
add - thread 758 wait 2 sec
add_and_detach - thread 1024 wait 1 sec
add - thread 759 wait 2 sec
add_and_detach - thread 1024 wait 2 sec
add - thread 755 wait 3 sec
add_and_detach - thread 1024 wait 3 sec
add - thread 757 wait 3 sec
add - thread 763 wait 1 sec
add - thread 760 wait 3 sec
add_and_detach - thread 1024 wait 3 sec
add - thread 767 wait 1 sec
add - thread 764 wait 2 sec
add - thread 765 wait 2 sec
add - thread 768 wait 1 sec
add - thread 766 wait 3 sec

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions