~ubuntu-branches/debian/sid/scala/sid

« back to all changes in this revision

Viewing changes to src/actors/scala/actors/scheduler/ActorGC.scala

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg, Mehdi Dogguy, Lucas Satabin, Frank S. Thomas, Emmanuel Bourg
  • Date: 2015-06-05 23:52:59 UTC
  • mfrom: (1.2.11)
  • Revision ID: package-import@ubuntu.com-20150605235259-wk00vgk83dh8o19g
Tags: 2.10.5-1
* Team upload.

[ Mehdi Dogguy ]
* New upstream release (Closes: #744278).

[ Lucas Satabin ]
* Update patches
* Update the clean target
* Update paths of elements to install
* Update watch file

[ Frank S. Thomas ]
* Remove myself from Uploaders.

[ Emmanuel Bourg ]
* The package has been adopted by the Java Team (Closes: #754935)
* Patched the build to avoid downloading libraries from the Internet
* Replaced the minified JavaScript files with unobfuscated ones
* No longer build scala-partest.jar until diffutils is packaged or replaced
* debian/watch: Fixed the versions matched (x.y.z instead of x.y.z..z)
* debian/rules:
  - Added the missing get-orig-source target (Closes: #724704)
  - Improved the clean target
* debian/control:
  - Build depend on scala (>= 2.10) and bnd
  - Use canonical URLs for the Vcs-* fields
  - Standards-Version updated to 3.9.6 (no changes)
* Switch to debhelper level 9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*                     __                                               *\
2
2
**     ________ ___   / /  ___     Scala API                            **
3
 
**    / __/ __// _ | / /  / _ |    (c) 2005-2011, LAMP/EPFL             **
 
3
**    / __/ __// _ | / /  / _ |    (c) 2005-2013, LAMP/EPFL             **
4
4
**  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **
5
5
** /____/\___/_/ |_/____/_/ | |                                         **
6
6
**                          |/                                          **
11
11
package scheduler
12
12
 
13
13
import java.lang.ref.{Reference, WeakReference, ReferenceQueue}
14
 
 
15
 
import scala.collection.mutable.HashSet
 
14
import scala.collection.mutable
16
15
 
17
16
/**
18
17
 * ActorGC keeps track of the number of live actors being managed by a
20
19
 * either been explicitly terminated or garbage collected.
21
20
 *
22
21
 * When an actor is started, it is registered with the ActorGC via the
23
 
 * <code>newActor</code> method, and when an actor is knowingly terminated
 
22
 * `newActor` method, and when an actor is knowingly terminated
24
23
 * (e.g. act method finishes, exit explicitly called, an exception is thrown),
25
 
 * the ActorGC is informed via the <code>terminated</code> method.
 
24
 * the ActorGC is informed via the `terminated` method.
26
25
 */
27
26
trait ActorGC extends TerminationMonitor {
28
27
  self: IScheduler =>
32
31
 
33
32
  /**
34
33
   * This is a set of references to all the actors registered with
35
 
   * this ActorGC. It is maintained so that the WeakReferences will not be GC'd
36
 
   * before the actors to which they point.
 
34
   * this ActorGC. It is maintained so that the WeakReferences will
 
35
   * not be GC'd before the actors to which they point.
37
36
   */
38
 
  private val refSet = new HashSet[Reference[t] forSome { type t <: TrackedReactor }]
 
37
  private val refSet = new mutable.HashSet[Reference[t] forSome { type t <: TrackedReactor }]
39
38
 
40
39
  /** newActor is invoked whenever a new actor is started. */
41
40
  override def newActor(a: TrackedReactor) = synchronized {