}
{
my $object : shared = &share({});
- lock($object); # so that we can cond_wait
threads->new(sub {
- lock($object); # so that we can cond_signal
bless $object, 'test1';
- cond_signal($object); # so that the parent thread waits
- });
- cond_wait($object); # so that the child thread finishes
+ })->join;
ok(15, ref($object) eq 'test1', "blessing does work");
my %test = (object => $object);
ok(16, ref($test{object}) eq 'test1', "and some more work");
ok(17, ref($test{object}) eq 'test2', "reblessing works!");
}
-
-