On 10/5/06 1:13 AM, "Andre Garzia" <[EMAIL PROTECTED]> wrote:
>> What sorts of tasks would threading be essential for? >> > > Making servers!!!! > > We need threads or fork(). Thats the only way to serve thousands of > concurrent connections. Andre, this is not best model. If you going developer servers of any kind, I recommend you take a look on ACE framework. Just read its docs. May be you will find useful buy 2 books of ACE main developer Douglas. In short: if you want have 1000 connections, it is NOT good idea to have 1000 threads. BECAUSE your computer have one or e.g. 4 CPUs. And your 1000 threads start slow down a lots only on switch of context. Exists other more effective models. > You create a simple server that can serve > just one request. You pick every request create a new thread/fork and > run that server with that request, even if it is a expensive request > that will take long to work, it will not interrupt or harm the other > request because each one is running on its own space. > > You can't really work with queues and task lists when building a web > server... I did that, but if something blocks, then the whole server > blocks... -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
