Add thread pool option to NonblockingServer

Summary: If you want requests processed outside of the I/O thread

Reviewed By: jake luciani, aditya

Test Plan: nb-main.cpp, in the test folder


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665132 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/Makefile.stress b/test/cpp/Makefile.stress
index a0fe4cf..9d79541 100644
--- a/test/cpp/Makefile.stress
+++ b/test/cpp/Makefile.stress
@@ -1,5 +1,5 @@
 # Makefile for Thrift test project.
-# 
+#
 # Author:
 #   Marc Kwiatkowski <marc@facebook.com>
 #   Aditya Agarwal   <aditya@facebook.com>
@@ -18,8 +18,8 @@
 target: all
 
 include_paths = $(thrift_home)/lib/cpp/src \
-		$(thrift_home)/lib/cpp \
-		$(boost_home)
+                $(thrift_home)/lib/cpp \
+                $(boost_home)
 
 include_flags = $(patsubst %,-I%, $(include_paths))
 
@@ -32,16 +32,22 @@
 LD     = g++
 
 # Compiler flags
-DCFL  = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -levent
-CFL   = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -levent
+DCFL  = -Wall -O3 -g -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
+CFL   = -Wall -O3 -I./gen-cpp $(include_flags) -L$(thrift_home)/lib/cpp/.libs -lthrift -lthriftnb -levent
 
-all: stress-test
+all: stress-test stress-test-nb
 
-debug: stress-test-debug
+debug: stress-test-debug stress-test-debug-nb
 
 stubs: ../StressTest.thrift
 	$(THRIFT) --cpp --php ../StressTest.thrift
 
+stress-test-debug-nb: stubs
+	g++ -o stress-test-nb $(DCFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
+
+stress-test-nb: stubs
+	g++ -o stress-test-nb $(CFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
+
 stress-test-debug: stubs
 	g++ -o stress-test $(DCFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
 
@@ -49,4 +55,4 @@
 	g++ -o stress-test $(CFL) src/main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
 
 clean:
-	rm -fr stress-test gen-cpp
+	rm -fr stress-test stress-test-nb gen-cpp