(mapResult, keyPrefix, mapFunction, mapContext)
| 19042 | var POOL_SIZE = 10; |
| 19043 | var traverseContextPool = []; |
| 19044 | function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) { |
| 19045 | if (traverseContextPool.length) { |
| 19046 | var traverseContext = traverseContextPool.pop(); |
| 19047 | traverseContext.result = mapResult; |
| 19048 | traverseContext.keyPrefix = keyPrefix; |
| 19049 | traverseContext.func = mapFunction; |
| 19050 | traverseContext.context = mapContext; |
| 19051 | traverseContext.count = 0; |
| 19052 | return traverseContext; |
| 19053 | } else { |
| 19054 | return { |
| 19055 | result: mapResult, |
| 19056 | keyPrefix: keyPrefix, |
| 19057 | func: mapFunction, |
| 19058 | context: mapContext, |
| 19059 | count: 0 |
| 19060 | }; |
| 19061 | } |
| 19062 | } |
| 19063 | |
| 19064 | function releaseTraverseContext(traverseContext) { |
| 19065 | traverseContext.result = null; |
no outgoing calls
no test coverage detected