[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] running libevent with multiple bases
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] running libevent with multiple bases
- From: Amy Hwang <amyomail@xxxxxxxxx>
- Date: Tue, 27 Jul 2010 14:16:11 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Tue, 27 Jul 2010 17:16:27 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=eQcTFx/FZMstcAc57v8MBKMDIKWYMB/Hd2kWTwMRGIc=; b=kEr0csP7hPA9bHHCw37C8MRylSZjyVPxR7j9Vp58Zh0ZxC9n6lufBrLWXrg043rbrc A8nms1+ehoEgSPv8uw2BI1G9uBfxqCckCcDlgUuMYCn3BHQHC/ebZkjxZzoXatLbr8mT /2HX2POHq7hPSxqMkU3CXZw7fqNXvYtzhbYoc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=uR1qLJG1GXefQmzBs4aKXvO6SN+rqJlRszn+SSwpBAAPPrztDstnzsgV0H/U3midJA DUIZskw8pvzKtS3HO9TEDIkNqVobg0pCs1Hdt192n6PaieD5KAHUEeGfezGddPNfmqz5 N8qV5Ge1wo0/R2Th4Z0yt/+of1bOcNPqyKO1U=
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
I have an architecture that reads and writes to a large number of
sockets, where the sockets are spread over a number of threads, each
with its own libevent base. Each socket is "owned" by a single
libevent base, and the bases don't interact with each other. I opted
for this architecture rather than a thread pool/job distribution one
because most of the heavy lifting should be interacting with the
sockets. I've read a couple of posts stating that multiple threads
with bases aren't really supported in libevent, but what I have so far
seems to be working.
Does what I've described seem like a reasonable thing to do in
libevent 2.0.5? I've also enabled pthreads just to be safe, although
I'm not exactly sure pthreads is actually contributing to anything.
Thanks in advance,
Amy
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.