[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] cancelled bufferevents and evbuffer_add_reference (2.0.3)
- To: libevent-users <libevent-users@xxxxxxxxxxxxx>
- Subject: Re: [Libevent-users] cancelled bufferevents and evbuffer_add_reference (2.0.3)
- From: Niels Provos <provos@xxxxxxxxx>
- Date: Sat, 20 Feb 2010 14:28:44 -0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Sat, 20 Feb 2010 17:28:51 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=4HQfw8G6MZkwQ5TGFh2VTu8ubGbn5jKZ1TnzcAYikWI=; b=MRQ93/Amq8lneORxonW441NOSu9qNRX3z/Z7ZpJnZj0zSp3mgprkulzGND2w6WN1tb NlZ5IeTDiwsq5uKTaB/qDv1f9aCNXprtviaNK0JpKqjsq3b8DLAwNcW6zJNSuBJee+LW 0/+U/a02g418kAPHUs3M+v4FbOXQhqFixlA74=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=smTigONiD9L6/5GsMfI+7wpbaYcaM7B73Z1VtaKZw8WcAiBfbhukFj3Zvp3T6XJpU0 h/IsJ9Axsehunwk7c6Kt4WAQcd1RToLARrBP7qp8h48gKAwPI1FnC9Vx6lpYGP6UZafA 4XoCJHz/QX2X+HRgUYzbJS6s1KN5ls6fjENSY=
- In-reply-to: <4B80456C.3050809@xxxxxxxxxxxx>
- References: <4B80456C.3050809@xxxxxxxxxxxx>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
On Sat, Feb 20, 2010 at 12:26 PM, Roman Puls <puls@xxxxxxxxxxxx> wrote:
> However, I ask myself what happens if we destroy the bufferevent during an
> ongoing send operation:
>
> app: evbuffer_add_ref(buf)
> levent: start sending on buf
> app: delete bufferevent
>
> Will we get a callback on the "onsent_handler" or not?
Hi Roman,
you should get the callback. The callback happens when the evbuffer
chain becomes unreferenced. Deleting the bufferevent will free the
evbuffer and that will trigger the callback.
Niels.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.