summaryrefslogtreecommitdiff
path: root/src/actors
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2007-05-16 09:17:17 +0000
committerPhilipp Haller <hallerp@gmail.com>2007-05-16 09:17:17 +0000
commit28972eb1cb4413adc665e59ecbd11c3ac27acc7c (patch)
tree609f64731c8fe4c6be34546979ba19fb83e937a0 /src/actors
parent8d6dced8a08efa789f69f68cca7883631365ebc1 (diff)
downloadscala-28972eb1cb4413adc665e59ecbd11c3ac27acc7c.tar.gz
scala-28972eb1cb4413adc665e59ecbd11c3ac27acc7c.tar.bz2
scala-28972eb1cb4413adc665e59ecbd11c3ac27acc7c.zip
removed unnecessary synchronization
Diffstat (limited to 'src/actors')
-rw-r--r--src/actors/scala/actors/Actor.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/actors/scala/actors/Actor.scala b/src/actors/scala/actors/Actor.scala
index e9159f6cba..f65ec526c4 100644
--- a/src/actors/scala/actors/Actor.scala
+++ b/src/actors/scala/actors/Actor.scala
@@ -33,7 +33,7 @@ object Actor {
*
* @return returns the currently executing actor.
*/
- def self: Actor = synchronized {
+ def self: Actor = {
var a = tl.get.asInstanceOf[Actor]
if (null eq a) {
a = new ActorProxy(currentThread)
@@ -50,7 +50,7 @@ object Actor {
* This permits to re-use the current thread as an actor
* even if its <code>ActorProxy</code> has died for some reason.
*/
- def resetProxy: unit = synchronized {
+ def resetProxy: unit = {
val a = tl.get.asInstanceOf[Actor]
if ((null ne a) && a.isInstanceOf[ActorProxy])
tl.set(new ActorProxy(currentThread))
@@ -69,7 +69,7 @@ object Actor {
* @param body the code block to be executed by the newly created actor
* @return the newly created actor. Note that it is automatically started.
*/
- def actor(body: => Unit): Actor = synchronized {
+ def actor(body: => Unit): Actor = {
val actor = new Actor {
def act() = body
}