[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Setting thread attributes
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] Setting thread attributes |
Date: |
Sun, 28 Jun 2020 20:51:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
1: If you use MHD's threaded modes, MHD 'insists' on creating the
threads itself. If you use the 'external' event loop (indeed with
MHD_NO_FLAG), then MHD runs (only) in the thread you call it from, and
only when you call MHD_run().
2: indeed.
-Christian
On 6/28/20 2:11 PM, Anaswara Nair wrote:
> Hi Christian,
>
> Thanks for your reply. I have few more doubts based on my understanding
> on the library. Please correct me if I am wrong.
>
> 1. Is it possible to have an external thread with desired attributes
> and use MHD without creating thread internally? Will it call the
> callbacks as desired? Will passing MHD_NO_FLAG to start_daemon helps
> this scenario? MHD_RUN() has something to do with this?
>
> 2. From your reply, what I understand is to call pthread_self() and
> related attribute set functions from MHD_AcessHandlerCallback. Is that
> correct?
>
> On Sun, 28 Jun 2020, 12:42 am Anaswara Nair, <anaswara.nn@gmail.com
> <mailto:anaswara.nn@gmail.com>> wrote:
>
> Hi,
>
> I am using libmicrohttpd for the first time. I wonder if it is
> possible to set attributes such as priority, affinity, scheduling
> policy, etc to the thread created by start_daemon. While exploring I
> found MHD_create_thread_(). But doubtful if it can be used directly
> from my application.
>
signature.asc
Description: OpenPGP digital signature