ClassesClassesClassesClasses | | | | Operators

create_barriercreate_barrierCreateBarriercreate_barrierCreateBarrierCreateBarrier (Operator)


create_barriercreate_barrierCreateBarriercreate_barrierCreateBarrierCreateBarrier — Create a barrier synchronization object.


create_barrier( : : AttribName, AttribValue, TeamSize : BarrierHandle)

Herror create_barrier(const char* AttribName, const char* AttribValue, const Hlong TeamSize, Hlong* BarrierHandle)

Herror T_create_barrier(const Htuple AttribName, const Htuple AttribValue, const Htuple TeamSize, Htuple* BarrierHandle)

Herror create_barrier(const HTuple& AttribName, const HTuple& AttribValue, const HTuple& TeamSize, Hlong* BarrierHandle)

void HBarrier::CreateBarrier(const HTuple& AttribName, const HTuple& AttribValue, const HTuple& TeamSize)

void CreateBarrier(const HTuple& AttribName, const HTuple& AttribValue, const HTuple& TeamSize, HTuple* BarrierHandle)

void HBarrier::HBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize)

void HBarrier::HBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize)

void HBarrier::HBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize)

void HBarrier::CreateBarrier(const HTuple& AttribName, const HTuple& AttribValue, Hlong TeamSize)

void HBarrier::CreateBarrier(const HString& AttribName, const HString& AttribValue, Hlong TeamSize)

void HBarrier::CreateBarrier(const char* AttribName, const char* AttribValue, Hlong TeamSize)

void HOperatorSetX.CreateBarrier(
[in] VARIANT AttribName, [in] VARIANT AttribValue, [in] VARIANT TeamSize, [out] VARIANT* BarrierHandle)

void HBarrierX.CreateBarrier(
[in] VARIANT AttribName, [in] VARIANT AttribValue, [in] Hlong TeamSize)

static void HOperatorSet.CreateBarrier(HTuple attribName, HTuple attribValue, HTuple teamSize, out HTuple barrierHandle)

public HBarrier(HTuple attribName, HTuple attribValue, int teamSize)

public HBarrier(string attribName, string attribValue, int teamSize)

void HBarrier.CreateBarrier(HTuple attribName, HTuple attribValue, int teamSize)

void HBarrier.CreateBarrier(string attribName, string attribValue, int teamSize)


A barrier is a synchronization object blocking a thread until a previous defined number of threads have reached this barrier. create_barriercreate_barrierCreateBarriercreate_barrierCreateBarrierCreateBarrier allocates and initializes the barrier object returned in BarrierHandleBarrierHandleBarrierHandleBarrierHandleBarrierHandlebarrierHandle according to the attributes specified in AttribNameAttribNameAttribNameAttribNameAttribNameattribName and AttribValueAttribValueAttribValueAttribValueAttribValueattribValue. AttribNameAttribNameAttribNameAttribNameAttribNameattribName specifies the attribute class and AttribValueAttribValueAttribValueAttribValueAttribValueattribValue the kind of the barrier. The description beneath lists all barrier kinds supported by following parameter classes:


empty string sets the default attributes.


specifies what happens if a thread waits at a barrier:


simply suspends the calling thread (default).


a fast barrier implementation for short waits that waits busy.

The TeamSizeTeamSizeTeamSizeTeamSizeTeamSizeteamSize argument specifies the number of threads that must call wait_barrierwait_barrierWaitBarrierwait_barrierWaitBarrierWaitBarrier before any of them successfully return from waiting. The value hold in TeamSizeTeamSizeTeamSizeTeamSizeTeamSizeteamSize must be greater than zero.



AttribNameAttribNameAttribNameAttribNameAttribNameattribName (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Barrier attribute.

Default value: '' "" "" "" "" ""

List of values: ''"""""""""", 'type'"type""type""type""type""type"

AttribValueAttribValueAttribValueAttribValueAttribValueattribValue (input_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Barrier attribute value.

Number of elements: AttribValue == AttribName

Default value: '' "" "" "" "" ""

List of values: ''"""""""""", 'sleep'"sleep""sleep""sleep""sleep""sleep", 'spin'"spin""spin""spin""spin""spin"

TeamSizeTeamSizeTeamSizeTeamSizeTeamSizeteamSize (input_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Barrier team size.

Default value: 1

BarrierHandleBarrierHandleBarrierHandleBarrierHandleBarrierHandlebarrierHandle (output_control)  barrier HBarrier, HTupleHTupleHBarrier, HTupleHBarrierX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Barrier synchronization object.


create_barriercreate_barrierCreateBarriercreate_barrierCreateBarrierCreateBarrier returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Successors

wait_barrierwait_barrierWaitBarrierwait_barrierWaitBarrierWaitBarrier, clear_barrierclear_barrierClearBarrierclear_barrierClearBarrierClearBarrier



ClassesClassesClassesClasses | | | | Operators