S
Seenu
Is it safe to create a static function in a multi threaded application
? As an example, I have a function that logs errors ,exceptions and
some informational data
public static void Log(....)
{
//
}
There are multiple threads in this application that call this function.
Is there any advantage if each thread creates an instance of the
class(I would remove the static) and uses it ? The function itself does
not access any instance variables. Will there be any thread saefty
issues if it is static. ?
Thank You
SRLoka
? As an example, I have a function that logs errors ,exceptions and
some informational data
public static void Log(....)
{
//
}
There are multiple threads in this application that call this function.
Is there any advantage if each thread creates an instance of the
class(I would remove the static) and uses it ? The function itself does
not access any instance variables. Will there be any thread saefty
issues if it is static. ?
Thank You
SRLoka