Thread.new Method [AX 2012]
Initializes a new instance of the Thread class.
If an attacker can control input to the new method, a security risk exists. Therefore, this method runs under Code Access Security. Calls to this method on the server require permission from the ExecutePermission class. Make sure that the user has development permissions by setting the security key to SysDevelopment on the control that calls this method.
The following example creates a new thread and then executes a method from the SysCodeProfiler class.
void ThreadNewExample()
{
Thread t;
ExecutePermission perm;
perm = new ExecutePermission();
if (!perm)
{
return;
}
perm.assert();
t = new Thread();
if (t)
{
t.removeOnComplete(true);
t.run(classnum(SysCodeProfiler), identifierstr(transferFile));
}
CodeAccessPermission::revertAssert();
}
Community Additions
ADD
Show: