Re: [Gluster-devel] Is there a safe way to cancel a timer ?

2014-12-19 Thread Xavier Hernandez
On 11/21/2014 04:56 AM, Krishnan Parthasarathi wrote: You should upload the patch, it would make reviewing easier. Sorry for the delay. I've had to do some other things in between. I uploaded a patch that implements a new timer interface [1]. It has been thought to make it very easy to use an

Re: [Gluster-devel] Is there a safe way to cancel a timer ?

2014-11-20 Thread Krishnan Parthasarathi
You should upload the patch, it would make reviewing easier. - Original Message - > Would it be ok if I upload a patch with my proposal for review ? > > Xavi > > On 11/12/2014 11:30 AM, Xavier Hernandez wrote: > > Hi Shyam, > > > > I've been discussing this stuff with Krishnan and we e

Re: [Gluster-devel] Is there a safe way to cancel a timer ?

2014-11-20 Thread Xavier Hernandez
Would it be ok if I upload a patch with my proposal for review ? Xavi On 11/12/2014 11:30 AM, Xavier Hernandez wrote: Hi Shyam, I've been discussing this stuff with Krishnan and we ended up with a proposal (see attached file). There many comments to explain how it works. What do you think ab

Re: [Gluster-devel] Is there a safe way to cancel a timer ?

2014-11-12 Thread Xavier Hernandez
Hi Shyam, I've been discussing this stuff with Krishnan and we ended up with a proposal (see attached file). There many comments to explain how it works. What do you think about this proposal ? Xavi On 11/11/2014 07:42 PM, Shyam wrote: On 11/10/2014 09:59 AM, Xavier Hernandez wrote: Hi Sh

Re: [Gluster-devel] Is there a safe way to cancel a timer ?

2014-11-11 Thread Shyam
On 11/10/2014 09:59 AM, Xavier Hernandez wrote: Hi Shyam, On 11/10/2014 03:36 PM, Shyam wrote: Hi Xavi, I think you are referring to the problem as I see it, and have posted here, http://review.gluster.org/#/c/6459/1/libglusterfs/src/timer.c If so, there is nothing clean to handle the case in

Re: [Gluster-devel] Is there a safe way to cancel a timer ?

2014-11-10 Thread Xavier Hernandez
Hi Shyam, On 11/10/2014 03:36 PM, Shyam wrote: Hi Xavi, I think you are referring to the problem as I see it, and have posted here, http://review.gluster.org/#/c/6459/1/libglusterfs/src/timer.c If so, there is nothing clean to handle the case in the code. Something akin to returning a non-zero

Re: [Gluster-devel] Is there a safe way to cancel a timer ?

2014-11-10 Thread Shyam
Hi Xavi, I think you are referring to the problem as I see it, and have posted here, http://review.gluster.org/#/c/6459/1/libglusterfs/src/timer.c If so, there is nothing clean to handle the case in the code. Something akin to returning a non-zero from the cancel and handling it by the consu

[Gluster-devel] Is there a safe way to cancel a timer ?

2014-11-10 Thread Xavier Hernandez
Hi, I'm having some problems when trying to cancel a timer. In current implementation it seems that it's not possible to know if a call to gf_timer_call_cancel() has really cancelled the timer or not. It means that it's possible that the callback will be called anyway. This is problematic if