analyze a procedure or module for potential thread safety issues
procedure or module
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.
p := proc(a) global x; x*a; end;
p ≔ procaglobalx;x*aend proc
m := module() export p1, p2; local a; p1 := proc(n) a := n; end; p2 := proc(n) a^n; end; end module;
m ≔ modulelocala;exportp1,p2;end module
The CodeTools[ThreadSafetyCheck] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
Download Help Document
What kind of issue would you like to report? (Optional)