MaxServerParallelism() public method

Specifies the maximum parallelism for the query. A zero or negative value means the number of logical cpus will be used as the parallelism for the query. There is also a server wide max_parallelism parameter which defaults to 1. If a request includes max_parallelism, it will be capped by the server max_parallelism. If a request does not include max_parallelism, the server wide max_parallelism will be used.
public MaxServerParallelism ( int parallelism ) : IQueryRequest
parallelism int
return IQueryRequest
        public void When_MaxServerParallelism_Is_Set_Request_Succeeds()
        {
            using (var bucket = _cluster.OpenBucket())
            {
                var queryRequest = new QueryRequest("SELECT * FROM default LIMIT 10;");
                queryRequest.MaxServerParallelism(4);

                var result = bucket.Query<dynamic>(queryRequest);
                Assert.IsTrue(result.Success);
            }
        }
        public void When_MaxServerParallism_Is_Set_Request_Has_It()
        {
            var queryRequest = new QueryRequest("SELECT * FROM default;");
            queryRequest.MaxServerParallelism(4);

            var query = queryRequest.GetFormValues();
            Assert.AreEqual(4.ToString(), query["max_parallelism"]);
        }