Hi LeonidCSIT,
Yes I see what is happening here, I think this is mostly and issue of running on Windows XP. You only will hit this issue if you use both CPPREST_FORCE_PPLX and CPPREST_TARGET_XP together. Apparently on XP the thread pool won't use another thread unless WT_EXECUTELONGFUNCTION is specified.
I think what you have done might be the best solution. However I'm hesitant to make this change in the code base. If WT_EXECUTELONGFUNCTION is specified for all tasks this could have a negative impact. A new thread could end up being created for each task, which would be inefficient. For small running tasks wouldn't be good.
Please note with Visual Studio 2015 this no longer will be an issue as well because there will be no point to using CPPREST_FORCE_PPLX, as by default all PPL tasks will run on the Windows thread pool instead of the Concurrency Runtime.
Steve
Yes I see what is happening here, I think this is mostly and issue of running on Windows XP. You only will hit this issue if you use both CPPREST_FORCE_PPLX and CPPREST_TARGET_XP together. Apparently on XP the thread pool won't use another thread unless WT_EXECUTELONGFUNCTION is specified.
I think what you have done might be the best solution. However I'm hesitant to make this change in the code base. If WT_EXECUTELONGFUNCTION is specified for all tasks this could have a negative impact. A new thread could end up being created for each task, which would be inefficient. For small running tasks wouldn't be good.
Please note with Visual Studio 2015 this no longer will be an issue as well because there will be no point to using CPPREST_FORCE_PPLX, as by default all PPL tasks will run on the Windows thread pool instead of the Concurrency Runtime.
Steve