mirror of
https://github.com/corda/corda.git
synced 2025-06-23 01:19:00 +00:00
ENT-6412: Upgrade ClassGraph 4.8.90 -> 4.8.135. (#6973)
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user