Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between timer and rbtimer in uWSGI?

I'm looking to add simple repeating tasks to my current application and I'm looking at the uwsgi signals api and there are two decorators @timer and @rbtimer. I've tried looking through the doc and even the python source at least but it appears it's probably more low level than that somewhere in the c implementation.

I'm familiar with the concept of a red-black tree but I'm not sure how that would relate to timers. If someone could clear things up or point me to the doc I might have missed I'd appreciate it.

like image 817
William Avatar asked Jul 05 '12 19:07

William


1 Answers

@timer uses kernel-level facilities, so they are limited in the maximum number of timers you can create.

@rbtimer is completely userspace so you can create an unlimited number of timers at the cost of less precision

like image 182
roberto Avatar answered Oct 29 '22 10:10

roberto