summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-10-31 08:12:40 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-10-31 08:12:40 -0700
commit4752f1243d5aa316b3a2042b93166647c665ee42 (patch)
tree42a20dca962d51097c6101d30b639a3a09d8a5bd /src
parentbf7e234d4964af2e3d95e149edccc66f4dc25b9e (diff)
parentf627d8a51e6b4f9afc017ee4bf02604cd094c9ae (diff)
downloadscala-4752f1243d5aa316b3a2042b93166647c665ee42.tar.gz
scala-4752f1243d5aa316b3a2042b93166647c665ee42.tar.bz2
scala-4752f1243d5aa316b3a2042b93166647c665ee42.zip
Merge pull request #1536 from vjovanov/issues/SI-6581
SI-6581 fixed by inlining `Actor.self`.
Diffstat (limited to 'src')
-rw-r--r--src/actors/scala/actors/remote/NetKernel.scala2
-rw-r--r--src/actors/scala/actors/remote/RemoteActor.scala10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/actors/scala/actors/remote/NetKernel.scala b/src/actors/scala/actors/remote/NetKernel.scala
index c6b2d8b8cd..8338f9a6a6 100644
--- a/src/actors/scala/actors/remote/NetKernel.scala
+++ b/src/actors/scala/actors/remote/NetKernel.scala
@@ -60,7 +60,7 @@ private[remote] class NetKernel(service: Service) {
send(node, name, msg, 'nosession)
def send(node: Node, name: Symbol, msg: AnyRef, session: Symbol) {
- val senderLoc = Locator(service.node, getOrCreateName(Actor.self))
+ val senderLoc = Locator(service.node, getOrCreateName(Actor.self(Scheduler)))
val receiverLoc = Locator(node, name)
namedSend(senderLoc, receiverLoc, msg, session)
}
diff --git a/src/actors/scala/actors/remote/RemoteActor.scala b/src/actors/scala/actors/remote/RemoteActor.scala
index 23cbae8532..571cb67e95 100644
--- a/src/actors/scala/actors/remote/RemoteActor.scala
+++ b/src/actors/scala/actors/remote/RemoteActor.scala
@@ -40,7 +40,7 @@ package remote
*/
object RemoteActor {
- private val kernels = new scala.collection.mutable.HashMap[Actor, NetKernel]
+ private val kernels = new scala.collection.mutable.HashMap[InternalActor, NetKernel]
/* If set to <code>null</code> (default), the default class loader
* of <code>java.io.ObjectInputStream</code> is used for deserializing
@@ -62,7 +62,7 @@ object RemoteActor {
private def createNetKernelOnPort(port: Int): NetKernel = {
val serv = TcpService(port, cl)
val kern = serv.kernel
- val s = Actor.self
+ val s = Actor.self(Scheduler)
kernels += Pair(s, kern)
s.onTerminate {
@@ -86,10 +86,10 @@ object RemoteActor {
* node.
*/
def register(name: Symbol, a: Actor): Unit = synchronized {
- val kernel = kernels.get(Actor.self) match {
+ val kernel = kernels.get(Actor.self(Scheduler)) match {
case None =>
val serv = TcpService(TcpService.generatePort, cl)
- kernels += Pair(Actor.self, serv.kernel)
+ kernels += Pair(Actor.self(Scheduler), serv.kernel)
serv.kernel
case Some(k) =>
k
@@ -97,7 +97,7 @@ object RemoteActor {
kernel.register(name, a)
}
- private def selfKernel = kernels.get(Actor.self) match {
+ private def selfKernel = kernels.get(Actor.self(Scheduler)) match {
case None =>
// establish remotely accessible
// return path (sender)