ClassesClassesClassesClasses | | | | Operators

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

par_joinpar_joinParJoinpar_joinParJoinParJoin (Operator)

Name

par_joinpar_joinParJoinpar_joinParJoinParJoin — Wait for subthreads that were started with the par_start qualifier.

Signature

par_join( : : ThreadID : )

Herror par_join(const Hlong ThreadID)

Herror T_par_join(const Htuple ThreadID)

Herror par_join(const HTuple& ThreadID)

void ParJoin(const HTuple& ThreadID)

void HOperatorSetX.ParJoin([in] VARIANT ThreadID)

static void HOperatorSet.ParJoin(HTuple threadID)

Description

The par_joinpar_joinParJoinpar_joinParJoinParJoin operator is used to wait in the calling procedure for all procedures or operators that have been started in separate subthreads by adding the par_start qualifier to the according program line. The subthreads to wait for are identified by their thread ids that are passed to the parameter ThreadIDThreadIDThreadIDThreadIDThreadIDthreadID.

Attention: par_start is not an operator but a qualifier that is added at the begin of the program line that has to be executed in parallel to the calling procedure. The syntax is par_start <ThreadID> : followed by the actual procedure or operator call.

Parameters

ThreadIDThreadIDThreadIDThreadIDThreadIDthreadID (input_control)  thread_id(-array) HTupleHTuple, HTupleVARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Ids of all subthreads to wait for.

Example (HDevelop)

* start two procedures in separate sub threads
par_start <ThreadID1> : producer_proc()
par_start <ThreadID2> : consumer_proc()
* wait until both procedures have finished
par_join ([ThreadID1, ThreadID2])

Result

If the values of the specified parameters are correct, par_joinpar_joinParJoinpar_joinParJoinParJoin returns 2 (H_MSG_TRUE). Otherwise an exception is raised and an error code returned.

Module

Foundation


ClassesClassesClassesClasses | | | | Operators