ENT-6412: Upgrade ClassGraph 4.8.90 -> 4.8.135. (#6973)

This commit is contained in:
Chris Rankin
2021-11-23 09:43:41 +00:00
committed by GitHub
parent 18333b4860
commit e93e7c2846
5 changed files with 15 additions and 11 deletions

View File

@ -11,9 +11,9 @@ import kotlin.concurrent.withLock
private val pooledScanMutex = ReentrantLock()
/**
* Use this rather than the built in implementation of [scan] on [ClassGraph]. The built in implementation of [scan] creates
* a thread pool every time resulting in too many threads. This one uses a mutex to restrict concurrency.
* Use this rather than the built-in implementation of [ClassGraph.scan]. The built-in implementation creates
* a thread pool every time, resulting in too many threads. This one uses a mutex to restrict concurrency.
*/
fun ClassGraph.pooledScan(): ScanResult {
return pooledScanMutex.withLock { this@pooledScan.scan() }
return pooledScanMutex.withLock(::scan)
}