Otherwise, all work items queued via `RunAsync` run on the global thread pool, not utilizing the thread pool initialized in `pool_init_once`.
From: Vibhav Pant vibhavp@gmail.com
--- dlls/threadpoolwinrt/main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/threadpoolwinrt/main.c b/dlls/threadpoolwinrt/main.c index f58c381cbbc..fc8b31ccde9 100644 --- a/dlls/threadpoolwinrt/main.c +++ b/dlls/threadpoolwinrt/main.c @@ -334,7 +334,7 @@ static DWORD WINAPI sliced_thread_proc(void *arg) struct thread_pool { INIT_ONCE init_once; - TP_POOL *pool; + TP_CALLBACK_ENVIRON environment; };
static struct thread_pool pools[3]; @@ -343,9 +343,12 @@ static BOOL CALLBACK pool_init_once(INIT_ONCE *init_once, void *param, void **co { struct thread_pool *pool = param;
- if (!(pool->pool = CreateThreadpool(NULL))) return FALSE; + memset(&pool->environment, 0, sizeof(pool->environment)); + pool->environment.Version = 1;
- SetThreadpoolThreadMaximum(pool->pool, 10); + if (!(pool->environment.Pool = CreateThreadpool(NULL))) return FALSE; + + SetThreadpoolThreadMaximum(pool->environment.Pool, 10);
return TRUE; } @@ -370,7 +373,7 @@ static HRESULT submit_threadpool_work(struct work_item *item, WorkItemPriority p if (!InitOnceExecuteOnce(&pool->init_once, pool_init_once, pool, NULL)) return E_FAIL;
- if (!(work = CreateThreadpoolWork(pool_work_callback, item, NULL))) + if (!(work = CreateThreadpoolWork(pool_work_callback, item, &pool->environment))) return E_FAIL;
IAsyncAction_AddRef((*action = item->action));
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=149832
Your paranoid android.
=== debian11b (64 bit WoW report) ===
dinput: force_feedback.c:6228: Test failed: GetResults returned 0x8000000e force_feedback.c:6228: Test failed: got result 0
This merge request was approved by Nikolay Sivov.