Merge branch 'develop'
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 4b41630..f6489b2 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -51,7 +51,7 @@
 # The short X.Y version.
 version = '0.6'
 # The full version, including alpha/beta/rc tags.
-release = '0.6.1'
+release = '0.6.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/predictionio/__init__.py b/predictionio/__init__.py
index 9dbb059..5f981bf 100644
--- a/predictionio/__init__.py
+++ b/predictionio/__init__.py
@@ -9,7 +9,7 @@
 __copyright__ = "Copyright 2013, TappingStone, Inc."
 __license__ = "Apache License, Version 2.0"
 
-__version__ = "0.6.1"
+__version__ = "0.6.2"
 
 
 # import packages
@@ -87,22 +87,20 @@
     :param threads: number of threads to handle PredictionIO API requests. Must be >= 1.
     :param apiurl: the PredictionIO API URL path.
     :param apiversion: the PredictionIO API version. (optional) (eg. "", or "/v1")
-
+    :param qsize: the max size of the request queue (optional).
+            The asynchronous request becomes blocking once this size has been reached, until the queued requests are handled. 
+            Default value is 0, which means infinite queue size.
 
     """
-    def __init__(self, appkey, threads=1, apiurl="http://localhost:8000", apiversion = ""):
+    def __init__(self, appkey, threads=1, apiurl="http://localhost:8000", apiversion = "", qsize=0):
         """Constructor of Client object.
 
-        :param appkey: the appkey
-        :param threads: number of threads for handling requests
-        :param apiurl: the PredictionIO API URL path.
-        :param apiversion: the PredictionIO API version. (optional) (eg. "", or "/v1")
-
         """
         self.appkey = appkey
         self.threads = threads
         self.apiurl = apiurl
         self.apiversion = apiversion
+        self.qsize = qsize
 
         # check connection type
         https_pattern = r'^https://(.*)'
@@ -117,7 +115,7 @@
         self.host = m.group(1)
 
         self._uid = None # identified uid
-        self._connection = Connection(host=self.host, threads=self.threads, https=self.https)
+        self._connection = Connection(host=self.host, threads=self.threads, qsize=self.qsize, https=self.https)
 
     def close(self):
         """Close this client and the connection.
diff --git a/tests/predictionio_test.py b/tests/predictionio_test.py
index 22177b4..9f2e8d7 100644
--- a/tests/predictionio_test.py
+++ b/tests/predictionio_test.py
@@ -222,6 +222,21 @@
 
         client.close()
 
+    def test_qsize(self):
+        client = predictionio.Client(APP_KEY, 1, API_URL, qsize=10)
+
+        client.identify("u222")
+        for i in range(100):
+            client.arecord_action_on_item("like", str(i))
+
+        n = 1
+        while n > 0:
+            n = client.pending_requests()
+            time.sleep(0.1)
+            print n
+
+        client.close()
+
 
 
 """