Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bgaidioz committed Feb 6, 2024
1 parent 3da76f3 commit 29c7d58
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ object CompilerServiceProvider {
private[raw] def set(language: Set[String], instance: CompilerService): Unit = {
instanceLock.synchronized {
if (instance == null) {
instanceMap.remove((language, None))
// stop and remove entries that match the `language`, regardless the class loader.
instanceMap.filterKeys(_._1 == language).foreach {
case (key, compiler) =>
compiler.stop()
instanceMap.remove(key)
}
} else {
instanceMap.put((language, None), instance)
}
Expand Down

0 comments on commit 29c7d58

Please sign in to comment.