libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Sleeping a request thread


From: Miguel Sancho
Subject: Re: [libmicrohttpd] Sleeping a request thread
Date: Wed, 24 May 2017 19:47:18 +0200

Ken, thanks a lot for your comments, this really helps
I agree it doesn't seem to be related to reaching the maximum number of threads

Regards
Miguel

2017-05-24 10:53 GMT+02:00 Miguel Sancho <address@hidden>:
Christian, thanks a lot for your answer,
here are more details, maybe you have seen something similar before?
I am seeing some issue with my process when I sleep the MHD request thread in THREAD_PER_CONNECTION mode
  • my process includes other threads reading from sockets which have nothing to do with MHD
  • seems that when I "sleep" the MHD request thread, this has an impact in other threads of the process, the messages get somehow "stuck" until the sleep in the MHD request thread finishes
  • the effect is the same, no matter if I execute a sleep() or a "long" while() (lasting for example 4s)

May the MHD thread sleep have an impact in other threads not related to MHD, any approach to work-around this?

Miguel


2017-05-19 0:22 GMT+02:00 Miguel Sancho <address@hidden>:
Hi,
using the MHD_USE_THREAD_PER_CONNECTION mode,
are there any issues in "sleeping" the request thread some seconds waiting for response? any known drawback in MHD?

for example to wait 4s:
         usleep(4000000)
         MHD_queue_response (..)

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]