提交 af2f257d authored 作者: Shane Bryldt's avatar Shane Bryldt

FS-10167: Added test_thread_pools to windows build, added BREAK condition to…

FS-10167: Added test_thread_pools to windows build, added BREAK condition to wait for objects to be added to the queue before the workers prematurely exit. Fixed a bug in thread pool creation that wasn't showing up under linux test.
上级 f023bf59
......@@ -21,6 +21,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testwebsock", "test\testweb
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testacl", "test\testacl.vcxproj", "{1E6DE729-F4D4-4455-B64C-73B31C17E12C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_thread_pools", "test\test_thread_pools.vcxproj", "{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download OPENSSL", "..\win32\Download OPENSSL.2015.vcxproj", "{D578E676-7EC8-4548-BD8B-845C635F14AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openssl", "..\win32\openssl\openssl.2015.vcxproj", "{25BD39B1-C8BF-4676-A738-9CABD9C6BC79}"
......@@ -104,6 +106,14 @@ Global
{90D1C15C-59B0-470F-B18A-DA355948C736}.Release|x64.Build.0 = Release|x64
{90D1C15C-59B0-470F-B18A-DA355948C736}.Release|x86.ActiveCfg = Release|Win32
{90D1C15C-59B0-470F-B18A-DA355948C736}.Release|x86.Build.0 = Release|Win32
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Debug|x64.ActiveCfg = Debug|x64
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Debug|x64.Build.0 = Debug|x64
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Debug|x86.ActiveCfg = Debug|Win32
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Debug|x86.Build.0 = Debug|Win32
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Release|x64.ActiveCfg = Release|x64
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Release|x64.Build.0 = Release|x64
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Release|x86.ActiveCfg = Release|Win32
{8AFFECE6-2A0B-4D44-990C-6D3DD832A250}.Release|x86.Build.0 = Release|Win32
{1E6DE729-F4D4-4455-B64C-73B31C17E12C}.Debug|x64.ActiveCfg = Debug|x64
{1E6DE729-F4D4-4455-B64C-73B31C17E12C}.Debug|x64.Build.0 = Debug|x64
{1E6DE729-F4D4-4455-B64C-73B31C17E12C}.Debug|x86.ActiveCfg = Debug|Win32
......
......@@ -135,7 +135,7 @@ static void *worker_thread(ks_thread_t *thread, void *data)
*/
check_queue(tp, KS_FALSE);
if (status == KS_STATUS_TIMEOUT) {
if (status == KS_STATUS_TIMEOUT || status == KS_STATUS_BREAK) {
idle_sec++;
if (idle_sec >= tp->idle_sec) {
......@@ -195,7 +195,7 @@ KS_DECLARE(ks_status_t) ks_thread_pool_create(ks_thread_pool_t **tp, uint32_t mi
ks_pool_open(&pool);
*tp = (ks_thread_pool_t *) ks_pool_alloc(pool, sizeof(ks_thread_t));
*tp = (ks_thread_pool_t *) ks_pool_alloc(pool, sizeof(ks_thread_pool_t));
(*tp)->min = min;
(*tp)->max = max;
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论