Quantcast
Channel: Chilkat Forum - latest questions
Viewing all articles
Browse latest Browse all 1061

50% CPU utilization with a Socket AcceptNextConnectionAsync process

$
0
0

The task manager shows a 50% CPU utilization.

I would understand that with a SYNC process but why with an ASYNC process ?

task = CkSocket_AcceptNextConnectionAsync(listenSocket,0);

if (CkSocket_getLastMethodSuccess(listenSocket) != TRUE)
goto labelend ;

if (!CkTask_Run(task))
{ CkTask_Dispose(task);
goto labelend ;
}

while (CkTask_getFinished(task) != TRUE)
CkTask_SleepMs(task,10); // Sleep 10 ms.

status = CkTask_getStatusInt(task) ;
if (status != 7) goto labelend ;

Thanks


Viewing all articles
Browse latest Browse all 1061

Trending Articles