Self - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Threads

  

Self

  

return the thread identifier of the current thread

 

Calling Sequence

Description

Examples

Calling Sequence

Self()

Description

• 

The Self command returns the threads identifier of the current thread.

• 

For the main thread, the thread identifier is always 0.  For other threads, the thread identifier is an integer greater than 0.

Examples

(1)

(2)

t := table();
p := proc( t )
    t[ Threads:-Self() ] := 1;
end proc;

(3)

(4)

(5)

See Also

Threads

Threads[ConditionVariable]

Threads[Create]

Threads[Mutex]

Threads[Wait]

 


Download Help Document