[Spread-users] 回复: Is there any elegant way to make application to regain CPU from being blocked in receive() ?

lzhshen 29585543 at qq.com
Tue Nov 4 01:14:58 EST 2008

FYI, sender sets an alarm (10 secs) before calling receive() for ACK event. If there is 
no ACK event in 10 secs, sender will receive a SIG_ALARM signal and signal handler
 will be invoked. In the signal handler, sender uses siglongjmp() to jump back to
 resend event logic.

Is there any problem with this logic? Doe siglongjmp make sender fail to receive ACK
 event even after the receiver become alive?

Is there any more elegant way to make sender to regain CPU from being blocked in 
receive() if there is no ACK event in a centain period of time?
Thanks in advance!

------------------ 原始邮件 ------------------
发件人: "Alexey Zakhlestin"<indeyets at gmail.com>;
发送时间: 2008年10月23日(星期四) 凌晨0:28
收件人: "lzhshen"<29585543 at qq.com>; 
抄送: "spread-users"<spread-users at lists.spread.org>; 
主题: Re: [Spread-users] how does Spread make sure that the event is successfully delivered to the subscriber?

  On Wed, Oct 22, 2008 at 12:58 PM, lzhshen <29585543 at qq.com> wrote:
>     When the event publisher sends the event to Spread and the subscriber
> lose the connection with Spread, will this event be lost forever? Will
> Spread sends the same event to the subscriber when it connects to Spread
> again?

it won't.
this kind of logic is supposed to be implemented on application-level.

think of spreas as of "UDP". if you need to verify delievery, you have
to implement "TCP" on top of it

Alexey Zakhlestin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20081104/9f31cdb2/attachment.html 

More information about the Spread-users mailing list