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

Online Help

All Products    Maple    MapleSim


CodeTools

  

ThreadSafetyCheck

  

analyze a procedure or module for potential thread safety issues

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ThreadSafetyCheck(p)

Parameters

p

-

procedure or module

Description

• 

The ThreadSafetyCheck command analyzes the given procedure or module and warns about specific thread-safety issues.

• 

Currently warnings are limited to the use of global variables and the use of lexically scoped local variables that are seen in assignment statements.

• 

The return value consists of a sequence of two integers counting the number of procedures flagged with thread-safety issues, followed by the total number of procedures analyzed.

Examples

withCodeTools:

p := proc(a) global x; x*a; end;

pprocaglobalx;x*aend proc

(1)

ThreadSafetyCheckp

1,1

(2)

m := module() export p1, p2; local a; p1 := proc(n) a := n; end; p2 := proc(n) a^n; end; end module;

mmodulelocala;exportp1,p2;end module

(3)

ThreadSafetyCheckm

2,2

(4)

Compatibility

• 

The CodeTools[ThreadSafetyCheck] command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

Threads