Am I susceptible to a crash if I create a Win32::GUI object (such as a label) in one thread, then call methods on that object in another thread?
Following is an example of what I mean. Notice that I'm passing the label object as an argument to the entry point function of the new thread. This seems to work, but I don't know if I should be doing it just because it works:
my $main = Win32::GUI::Window->new
-name => '
-text => 'Template Window',
-size => [300,300],
my $label = $main->AddLabel
-text => 'I like the number 10',
-pos => [10,10],
my $labelObject = shift;
for (my $i=9; $i>0; $i--)
$labelObject->Text("I like the number $i");