C# Class Rhino.Synchronizer

This class provides support for implementing Java-style synchronized methods in Javascript.
This class provides support for implementing Java-style synchronized methods in Javascript. Synchronized functions are created from ordinary Javascript functions by the Synchronizer constructor, e.g. new Packages.org.mozilla.javascript.Synchronizer(fun). The resulting object is a function that establishes an exclusive lock on the this object of its invocation. The Rhino shell provides a short-cut for the creation of synchronized methods: sync(fun) has the same effect as calling the above constructor.
Inheritance: Delegator
Show file Open project: hazzik/Rhino.Net

Public Methods

Method Description
Call ( Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
Synchronizer ( Scriptable obj ) : Rhino

Create a new synchronized function from an existing one.

Create a new synchronized function from an existing one.

Synchronizer ( Scriptable obj, object syncObject ) : Rhino

Create a new synchronized function from an existing one using an explicit object as synchronization object.

Create a new synchronized function from an existing one using an explicit object as synchronization object.

Method Details

Call() public method

public Call ( Context cx, Scriptable scope, Scriptable thisObj, object args ) : object
cx Context
scope Scriptable
thisObj Scriptable
args object
return object

Synchronizer() public method

Create a new synchronized function from an existing one.
Create a new synchronized function from an existing one.
public Synchronizer ( Scriptable obj ) : Rhino
obj Scriptable the existing function
return Rhino

Synchronizer() public method

Create a new synchronized function from an existing one using an explicit object as synchronization object.
Create a new synchronized function from an existing one using an explicit object as synchronization object.
public Synchronizer ( Scriptable obj, object syncObject ) : Rhino
obj Scriptable the existing function
syncObject object the object to synchronized on
return Rhino