Every 10ms ,check_timeout will be executed.All USERS * pointer will be
enumerate and timeout for user will be checked .If there are many
users , the complexity would be O(n),where n is the user count.
 We can use a boost multi-index to sort USERS * by list->idle and list-
>subuser->raw_pools.nraw. If one index was sorted by  list->idle
descent,we can check if (ctime - list->idle) >= TIMEOUT_SEC then del
user,else stop enumerate the index.The list->subuser->raw_pools.nraw
index can be use in same way. check_timeout function will be executed
fast.

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to