Welcome Guest Search | Active Topics | Members | Log In | Register

thread pool Options
gang
Posted: Friday, April 25, 2008 11:17:38 PM
Rank: Newbie
Groups: Member

Joined: 4/25/2008
Posts: 5
Points: 10
Is it means that we don't need to write our own thread pool after using code in the OnConnect() event ?

Is it means all we need to do is adding code to OnConnect() , and it will run in a new thread ?

sorry this question is too primitive, but i don't clearly understand it
admin
Posted: Saturday, April 26, 2008 4:42:30 AM
Rank: Administration
Groups: Administration

Joined: 2/15/2008
Posts: 130
Points: 835
Yes, you are absolutelly right. Thread pool is implemented by XF.Server, so you should not write your own one.
Best performance results can be achived if your operation handling code is non-blocking, thus processing thread is not blocked and can be reused for other operations.

Context switching is a bottleneck for many applications, so XF.Server tries to keep the number of running threads equal to the numbers of processors(cores) in the system.
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.6 (NET v2.0) - 11/14/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.125 seconds.
9 queries (0.090 seconds, 72.00%).

yaf_pageload: 0.007
yaf_topic_info: 0.002
yaf_forum_list: 0.011
yaf_forum_listpath: 0.017
yaf_forum_listpath: 0.002
yaf_post_list: 0.025
yaf_usergroup_list: 0.001
yaf_usergroup_list: 0.002
yaf_active_listtopic: 0.023