C# Class clojure.lang.Atom

Provides spin-loop synchronized access to a value. One of the reference types.
Inheritance: ARef
显示文件 Open project: richhickey/clojure-clr

Public Methods

Method Description
Atom ( object state ) : System

Construct an atom with given intiial value.

Atom ( object state, IPersistentMap meta ) : System

Construct an atom with given initial value and metadata.

deref ( ) : object

Gets the (immutable) value the reference is holding.

Private Methods

Method Description
compareAndSet ( object oldv, object newv ) : bool
reset ( object newv ) : object
swap ( IFn f ) : object
swap ( IFn f, Object arg ) : object
swap ( IFn f, Object arg1, Object arg2 ) : object
swap ( IFn f, Object x, Object y, ISeq args ) : object

Method Details

Atom() public method

Construct an atom with given intiial value.
public Atom ( object state ) : System
state object The initial value
return System

Atom() public method

Construct an atom with given initial value and metadata.
public Atom ( object state, IPersistentMap meta ) : System
state object The initial value.
meta IPersistentMap The metadata to attach.
return System

deref() public method

Gets the (immutable) value the reference is holding.
public deref ( ) : object
return object