Threads - Maple Programming Help

 Wait
 wait for a thread to finish

 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

 $\left[{\mathrm{Add}}{,}{\mathrm{ConditionVariable}}{,}{\mathrm{Create}}{,}{\mathrm{Map}}{,}{\mathrm{Mul}}{,}{\mathrm{Mutex}}{,}{\mathrm{Self}}{,}{\mathrm{Seq}}{,}{\mathrm{Sleep}}{,}{\mathrm{Task}}{,}{\mathrm{Wait}}\right]$ (1)
 > id := Create( int( sin(x)^x, x ), d );
 ${\mathrm{id}}{≔}{1}$ (2)
 > d;
 ${d}$ (3)
 > Wait( id );
 > d;
 ${\int }{{\mathrm{sin}}{}\left({x}\right)}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (4)
 > id1 := Create( int( (1/x)^x, x ), d1 );
 ${\mathrm{id1}}{≔}{2}$ (5)
 > id2 := Create( int( x^x, x ), d2 );
 ${\mathrm{id2}}{≔}{3}$ (6)
 > d1, d2;
 ${\mathrm{d1}}{,}{\int }{{x}}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (7)
 > Wait( id1, id2 );
 > d1, d2;
 ${\int }{\left(\frac{{1}}{{x}}\right)}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}{,}{\int }{{x}}^{{x}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (8)
 >