Hi, good work, it looks a smart and easy solution :)
My only concern is the integer overflow, with 64 bits we will not have issues for a few years, but is not the case for 32 bit platform. What about a little modification to use unsigned int and validate against UINT_MAX ? so when it reach the limit it can reset the counters ?? regards, On Fri, May 4, 2012 at 10:42 AM, Lauri Kasanen <[email protected]> wrote: > Hi > > This is the first try of a lockless scheduler, by using two 64-bit variables > per worker thread instead of one active_connections variable. > > This way the worker thread and the manager thread only write to their own > variables, and there is no data race. > > I have measured the speed to be within variance on a 6-core cpu. > > - Lauri > > _______________________________________________ > Monkey mailing list > [email protected] > http://lists.monkey-project.com/listinfo/monkey > -- Eduardo Silva http://edsiper.linuxchile.cl http://www.monkey-project.com _______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
