Region

Definitions

def closeOnExit(x: a, rc: Region[r]): Unit \ IOSource

Add x to a stack of Closeable to be closed when the region exits:

  • Closeables are guaranteed to be closed after any threads within the region have been joined.
  • Closeables are guaranteed to be closed in the reverse order in which they're added (most recently added first).