Threads - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Multithreaded Programming : Threads/Wait

Threads

  

Wait

  

wait for a thread to finish

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Wait( id1, id2, ... )

Parameters

id1, id2, ...

-

(integer) thread identifiers

Description

• 

The Wait command pauses the current thread until the threads specified as arguments finish.

Examples

with(Threads);

Add,ConditionVariable,Create,Map,Mul,Mutex,Self,Seq,Sleep,Task,Wait

(1)

id := Create( int( sin(x)^x, x ), d );

id1

(2)

d;

d

(3)

Wait( id );

d;

sinxxⅆx

(4)

id1 := Create( int( (1/x)^x, x ), d1 );

id12

(5)

id2 := Create( int( x^x, x ), d2 );

id23

(6)

d1, d2;

d1,xxⅆx

(7)

Wait( id1, id2 );

d1, d2;

1xxⅆx,xxⅆx

(8)

 

See Also

Threads

Threads[ConditionVariable]

Threads[Create]

Threads[Mutex]

Threads[Self]