Ejemplo n.º 1
0
        private int AddResult(QueryResult result)
        {
            result.LockRoot();

            int resultId;

            lock (resultMap) {
                resultId            = ++uniqueResultId;
                resultMap[resultId] = result;
            }

            return(resultId);
        }
        private int AddResult(QueryResult result)
        {
            // Lock the roots of the result set.
            result.LockRoot(-1);             // -1 because lock_key not implemented

            // Make a new result id
            int resultId;

            // This ensures this block can handle concurrent updates.
            lock (resultMap) {
                resultId = ++uniqueResultId;
                // Add the result to the map.
                resultMap[resultId] = result;
            }

            return(resultId);
        }
Ejemplo n.º 3
0
        private int AddResult(QueryResult result)
        {
            result.LockRoot(-1); // -1 because lock_key not implemented

            int resultId;

            lock (resultMap) {
                resultId = ++uniqueResultId;
                resultMap[resultId] = result;
            }

            return resultId;
        }
Ejemplo n.º 4
0
        private int AddResult(QueryResult result)
        {
            // Lock the roots of the result set.
            result.LockRoot(-1); // -1 because lock_key not implemented

            // Make a new result id
            int resultId;
            // This ensures this block can handle concurrent updates.
            lock (resultMap) {
                resultId = ++uniqueResultId;
                // Add the result to the map.
                resultMap[resultId] = result;
            }

            return resultId;
        }
Ejemplo n.º 5
0
        private int AddResult(QueryResult result)
        {
            result.LockRoot();

            int resultId;

            lock (resultMap) {
                resultId = ++uniqueResultId;
                resultMap[resultId] = result;
            }

            return resultId;
        }