On Thu, Dec 16, 2010 at 01:48:42PM +0800, Wen Congyang wrote: > At 12/15/2010 11:32 PM, Daniel P. Berrange Write: > > On Wed, Dec 15, 2010 at 08:24:44AM -0700, Eric Blake wrote: > >> On 12/15/2010 08:20 AM, Eric Blake wrote: > >>> On 12/14/2010 07:34 PM, Wen Congyang wrote: > >>> > >>> In addition to Hu's comments, and the fact that you are probably going > >>> to revise the exposed interface anyways, here's some additional points. > >> > >> One other point - how does this relate to the timeouts already > >> implemented in places like daemon/event.c or src/util/event.c? Are > >> those implementations already sufficient for your needs without having > >> to write a new implementation? Or conversely, should your patch series > >> be lengthened into rewriting those interfaces to take advantage of your > >> new implementation in order to ease maintenance by focusing all timeout > >> code into a single reusable interface? In other words, I'm still > >> seeking a bit more justification for this patch. > > > > IMHO it should be sufficient for this new code to simply call > > the existing virEventAddTimeout() API, and run the event loop > > in the background thread. > > Hmm... I do not notice this API... > > Thanks for pointing this. > > I rough scan this API, it uses gettimeofday() to calculate the timeout. > The time returns from gettimeofday can be changed by user, and it will > cause some problems... In theory yes, but in reality that's a non-issue. We've had this code for 4 years and never had any reports of such a problem. Daniel -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list