de.sciss.lucre.synth.NodeIdAllocator.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lucresynth_2.11 Show documentation
Show all versions of lucresynth_2.11 Show documentation
Transactional extension for ScalaCollider
/*
* NodeIdAllocator.scala
* (SoundProcesses)
*
* Copyright (c) 2010-2019 Hanns Holger Rutz. All rights reserved.
*
* This software is published under the GNU Lesser General Public License v2.1+
*
*
* For further information, please contact Hanns Holger Rutz at
* [email protected]
*/
package de.sciss.lucre.synth
import impl.{NodeIdAllocatorImpl => Impl}
import scala.concurrent.stm.InTxn
object NodeIdAllocator {
def apply(user: Int, initTemp: Int): NodeIdAllocator = new Impl(user = user, initTemp = initTemp)
}
trait NodeIdAllocator{
def alloc()(implicit tx: InTxn): Int
}