View Issue Details

IDProjectCategoryView StatusLast Update
0007197libmicrohttpdthread poolpublic2024-01-21 13:32
Reporterbasch Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version0.9.75 
Fixed in Version0.9.76 
Summary0007197: MHD_USE_ITC is disabled w/o MHD_USE_INTERNAL_POLLING_THREAD
DescriptionHello,

I'm using MHD in one thread and let it do all the select()-stuff through MHD_run_wait().

Also, I'm passing MHD_USE_ITC to MHD_start_daemon() because daemon->itc is used in MHD_resume_connection() to immediately wake up the select().

However, in MHD_start_daemon() the MHD_USE_ITC-flag is reset if MHD_USE_INTERNAL_POLLING_THREAD isn't set.

Thanks and keep up the good work,
Seb.
TagsNo tags attached.

Activities

Christian Grothoff

2023-02-08 14:38

manager   ~0019778

I'm a bit confused. MHD_USE_INTERNAL_POLLING_THREAD *must* be set if you use MHD_run_wait():

enum MHD_Result MHD_run_wait (struct MHD_Daemon *daemon, int32_t millisec) {
  if ( (daemon->shutdown) ||
       (0 != (daemon->options & MHD_USE_INTERNAL_POLLING_THREAD)) )
    return MHD_NO;
  // ...
}

so without that flag, using MHD_run_wait() just won't work! So either you do set that flag, and then the MHD_USE_ITC flag will not be cleared, or you do not use internal polling, but then your event loop will be done by yourself and hence you can do the ITC yourself. What am I not understanding?

Christian Grothoff

2024-01-21 13:32

manager   ~0020938

Reporter provided no further feedback.

Issue History

Date Modified Username Field Change
2022-03-17 21:29 basch New Issue
2023-02-08 14:38 Christian Grothoff Note Added: 0019778
2023-02-08 14:38 Christian Grothoff Assigned To => Christian Grothoff
2023-02-08 14:38 Christian Grothoff Status new => feedback
2024-01-21 13:25 Christian Grothoff Category libmicrohttpd multi-threaded operation => thread pool
2024-01-21 13:32 Christian Grothoff Status feedback => resolved
2024-01-21 13:32 Christian Grothoff Resolution open => no change required
2024-01-21 13:32 Christian Grothoff Fixed in Version => 0.9.76
2024-01-21 13:32 Christian Grothoff Note Added: 0020938
2024-01-21 13:32 Christian Grothoff Status resolved => closed