(mapResult, keyPrefix, mapFunction, mapContext)
| 19007 | var POOL_SIZE = 10; |
| 19008 | var traverseContextPool = []; |
| 19009 | function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { |
| 19010 | if (traverseContextPool.length) { |
| 19011 | var traverseContext = traverseContextPool.pop(); |
| 19012 | traverseContext.result = mapResult; |
| 19013 | traverseContext.keyPrefix = keyPrefix; |
| 19014 | traverseContext.func = mapFunction; |
| 19015 | traverseContext.context = mapContext; |
| 19016 | traverseContext.count = 0; |
| 19017 | return traverseContext; |
| 19018 | } else { |
| 19019 | return { |
| 19020 | result: mapResult, |
| 19021 | keyPrefix: keyPrefix, |
| 19022 | func: mapFunction, |
| 19023 | context: mapContext, |
| 19024 | count: 0 |
| 19025 | }; |
| 19026 | } |
| 19027 | } |
| 19028 | |
| 19029 | function releaseTraverseContext(traverseContext) { |
| 19030 | traverseContext.result = null; |
no outgoing calls
no test coverage detected