[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] Multi-threaded support in libevent
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: [Libevent-users] Multi-threaded support in libevent
- From: Jan Danielsson <jan.m.danielsson@xxxxxxxxx>
- Date: Thu, 23 Feb 2017 16:26:44 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Thu, 23 Feb 2017 10:26:51 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:openpgp:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=aEeFcxbch/+4f99rYD//p8kNJVAv9QJxoGzzQY4ApZk=; b=u4yS1H8JZUH7YWpF6JwEQu6HFVvoKKgLF6BSNrgKXizkeqkKjEoynsnQ8jOZjHWYY3 G59RsRNi1g7rZI0G4gbAXRHs+HiQd6U6shUSPDHBGS0b82DYuS2RewWFN6dmw25i5VoF Hi47Rr/9mWuMY4SQCuzY3k3Nc1gH2LPvj42EdaMV6j6pm4GX+vz8+HGr3FXFq8EAn3Ek 3EJOksH2vKc3CcmsQcl2X7m2//S4ztBfyr9dqjtdLUUdadQ0jkyp+IGJHxlicnxebQxO XI1BJLgiiFQdpWIdDQfUxLlvm2RLqh0p6Lh1Nv8K+Sz1HGJ7jh3Xt24Y/E58uWVR0JL6 hdrQ==
- In-reply-to: <CANcT8NN65EnL9WT_ziAh3gVq=9bQiE-cDG+tKyB1as8oCsY-xg@mail.gmail.com>
- Openpgp: id=99F584B080A7CF24DAB7D9A59BC6EECE13D7A8ED
- Organization: La Cosa Nostra
- References: <CANcT8NN65EnL9WT_ziAh3gVq=9bQiE-cDG+tKyB1as8oCsY-xg@mail.gmail.com>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (X11; NetBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
On 02/23/17 11:20, Tôn Loan wrote:
[---]
> So, is there any solution for each event_base that will receive its own
> signals?
I needed something similar myself a few years ago, and I think I
concluded that libevent couldn't handle per-thread granularity for signals.
Source of relevant module:
https://github.com/libevent/libevent/blob/master/signal.c
(The warning message in evsig_add() seems relevant).
In my case I wanted to use signals as, well, a signalling mechanism
(tell threads to update their configuration, terminate the event loop,
etc). It was a long time ago, and I can't remember exactly how I solved
it, but I recall experimenting with pipes. If what you need is IPC to
control the event loops in the tread, check out pipes.
--
Kind regards,
Jan Danielsson
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.