Dnia 3-02-2009 o godz. 12:29 Igor R napisał(a):
First of all, there're more tasks: pay attention that before issuing new async_accept, the Server calls connection->open(), which in turn issues async_read etc - all this is processed by one single io_service...

but I'm asking about moment when server is constructed & run n threads for one io_service. only one run() will 'hang' on async_accept. the rest of run() must return... but doesn't. I see all threads (when run "ps -eLf" command). I don't know how it is possible...

But anyway - what if you've got 1000 incoming connections simultaniously? If you'd got 1 thread, it would accept them one by one, processing in the meanwhile read/write operations of the Connection object.


I don't know how it is possible but let leav for while this problem. it works - it is enough for that while(ofcourse I wish understand :) ). I have another question about strand object. first we are parallelising than synchronizing our tasks via strand object. I can't catch this logic. it must be nonefective.

tom



----------------------------------------------------
Nużą Cię utarte scenariusze?
Wymyśl własną grę flashową i wygraj główną nagrodę 5.500 Euro:
http://klik.wp.pl/?adr=http://whosegame.pl/contestcard.php?contest=55&sid=631