Say we have the following interleaving:

Thread1:
discardSourceFile(s)
  |_ removeUnitOf(s)
  |_ context switch

Thread2:
askReload(s) // <-- this call will effectively undo the above ``removeUnitOf`` call

Thread1:
sourceFiles.remove(scu)

Assume the next call is ``ScalaPresentationCompiler.compilationUnits``. What should we get back?

Now, ``unitOfFile`` will contain a RichCompilationUnit for ``s``, while ``sourceFiles`` won't. If you agree this  can happen, then calling ``ScalaPresentationCompiler.compilationUnits`` breaks the contract of the method, as stated in its ScalaDoc:

```/** Return the Scala compilation units that are currently maintained by this presentation compiler.*/```

That won't be true because ``sourceFiles`` doesn't have a compilation unit for ``s``, while the presentation compiler does. I.e., we have a out-of-sync state.