Is Http Server 3 a good approach for this? http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/examples.html#boost... I've got a server, that listens on a socket. It receives requests, and does CPU-bound work, then writes out a response. So I'd like it to handle N requests at a time, where N is the number of cores. HTTP Server 3 looks like it does this, but questions: - is this the best approach? - what (practically speaking) will happen to HTTP Server 3 if all of its threads are busy processing requests, and say 10 requests arrive. Will they fail? Will the O/S queue them up? - Alex
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Pavel Shevaev Sent: Wednesday, July 22, 2009 3:44 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] weak_ptr and thread safety
// before A and B shared_ptr<X> p( new X ); weak_ptr<X> wp( p );
// A shared_ptr<X> p2 = wp.lock();
// B p.reset();
is safe (A reads wp, B writes p).
This is my case, thanks for the clarification(what a relief, btw). Hm...guess at least it's not what causing my app to seg.fault :)
-- Best regards, Pavel _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users