diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-13 03:18:18 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-19 21:13:48 -0400 |
commit | c095f435b68272d4ae0409ab4c9466145609710e (patch) | |
tree | 189f0f2755d8fd2e6af3eec9d514c29b3cebdef5 /stage1/resolver.scala | |
parent | ca7e166e09776410ef39e2808aab6a3fdd1e7911 (diff) | |
download | cbt-c095f435b68272d4ae0409ab4c9466145609710e.tar.gz cbt-c095f435b68272d4ae0409ab4c9466145609710e.tar.bz2 cbt-c095f435b68272d4ae0409ab4c9466145609710e.zip |
Refactored ClassLoaderCache to use key locked cache to pave the way for caching classloaders hierarchically without deadlocks
Diffstat (limited to 'stage1/resolver.scala')
-rw-r--r-- | stage1/resolver.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/stage1/resolver.scala b/stage1/resolver.scala index 98955cb..8dde321 100644 --- a/stage1/resolver.scala +++ b/stage1/resolver.scala @@ -87,7 +87,7 @@ abstract class Dependency{ } private object classLoaderCache extends Cache[URLClassLoader] - def classLoader: URLClassLoader = classLoaderCache{ + def classLoader( classLoaderCache: ClassLoaderCache ): URLClassLoader = { if( concurrencyEnabled ){ // trigger concurrent building / downloading dependencies exportClasspathConcurrently @@ -112,7 +112,10 @@ abstract class Dependency{ if(cacheDependencyClassLoader){ new URLClassLoader( buildClassPath, - ClassLoaderCache.get( cachedClassPath ) + classLoaderCache.permanent.get( + cachedClassPath.string, + cbt.URLClassLoader( classpath, ClassLoader.getSystemClassLoader ) + ) ) } else { new URLClassLoader( |