Hello everyone,

I'm currently debugging and understanding all the Client Flows and I have a
question that I would be glad if you could answer me.

When I run the FreeRDP Client I see that the program has 2 places that it
creates threads and add them to the thread pool.

In path:

libfreerdp/codec/rfx.c

RFX_CONTEXT* rfx_context_new(BOOL encoder)



*First place: winpr/libwinpr/pool/pool.c*

static BOOL InitializeThreadpool(PTP_POOL pool)

*Second place: **winpr/libwinpr/pool/pool.c*

BOOL winpr_SetThreadpoolThreadMinimum(PTP_POOL ptpp, DWORD cthrdMic)
In each of these places it creates 4 threads (8 in total) in the same
pool and with the same thread routine function

static void* thread_pool_work_func(void* arg)

What this routine function does is WaitingForMultipleObjects, in our case 2
events
1) *TerminateEvent* - which happens when the program is terminated.
2) *QueueEvent* - which I don't understand what it is waiting for.

So my question is, why are these 8 threads created and what are they
waiting for at this *QueueEvent?*

-- 
Sincerely,
Guy Milrud
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
FreeRDP-devel mailing list
FreeRDP-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to