|
Scala example source code file (FinalizerHandle.scala)
The FinalizerHandle.scala Scala example source codepackage scalaz package effect /** * A handle to a finalizer that allows you to duplicate it to a parent region using "dup". * Duplicating a finalizer means that instead of being performed when the current region * terminates, it is performed when the parent region terminates. */ sealed abstract class FinalizerHandle[R[_]] { val finalizer: RefCountedFinalizer } object FinalizerHandle { def apply[R[_]](r: RefCountedFinalizer): FinalizerHandle[R] = finalizerHandle[R](r) def finalizerHandle[R[_]](r: RefCountedFinalizer): FinalizerHandle[R] = new FinalizerHandle[R] { val finalizer = r } } Other Scala examples (source code examples)Here is a short list of links related to this Scala FinalizerHandle.scala source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.