Class: TSynchronizedBase

Declaration: Synchronized.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TSynchronized.

Purpose:

Provides non-blocking concurrent access to void pointers.

Instantiation:

Use TSynchronized for type-safe non-blocking concurrent access to data. See instantiation information in TSynchronized for more.

Deriving Classes:

The only derived class is the TSynchronized template class.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

TSynchronizedBase implements the template class TSynchronized. TSynchronized provides the preferred type-safe interface to this service. Note that TSynchronizedBase objects should be instantiated with static linkage to get automatic C-style initialization. This is the reason that TSynchronizedBase does not have a constructor. If a TSynchronizedBase is instantiated on the stack or on the heap, the creator is responsible for initializing the object using the Set() member function.

Member Function: TSynchronizedBase::BaseGet

void * BaseGet () const

Interface Category:

API.

Purpose:

Implements TSynchronized::Get()

Calling Context:

Called by TSynchronized::Get() to read a value atomically.

Parameters:

Return Value:

Returns the value of the synchronized datum.

Exceptions:

Throws no exceptions.

Concurrency:

Multithread safe.

Other Considerations:

BaseGet is the implementation of TSynchronized::Get(). TSynchronized provides the preferred type-safe interface to this service.

Member Function: TSynchronizedBase::BaseSetConditional

bool BaseSetConditional (void * test, void * newValue)

Interface Category:

API.

Purpose:

Implements TSynchronized::SetConditional()

Calling Context:

Called by TSynchronized::SetConditional() to conditionally set a value atomically.

Parameters:

Return Value:

Returns true if the value was not set, false if the value was set.

Exceptions:

Throws no exceptions.

Concurrency:

Multithread safe.

Other Considerations:

BaseSetConditional is the implementation of TSynchronized::SetConditional. TSynchronized provides the preferred type-safe interface to this service.

Member Function: TSynchronizedBase::BaseSet

void BaseSet (void * newValue)

Interface Category:

API.

Purpose:

Implements TSynchronized::Set()

Calling Context:

Called by TSynchronized::Set() to set a value atomically.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions.

Concurrency:

Multithread safe.

Other Considerations:

BaseSet is the implementation of TSynchronized::Set. TSynchronized provides the preferred type-safe interface to this service.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.