I was -- but I played around with things and finally got it to work, albeit in a weird way.
Turns out I had to stick $wWorkEVT and $pct_shared into the main:: namespace, and specifically use threads and use threads shared there. I was trying to keep this within the app's namespace, Polymorph::, and have all the shared variables be part of $self, but I don't get to, looks like. Even if there is a way, now that it works, I don't want to break it again. And while I feel it's ugly and bad form to use globals (coming from a mod_perl background I'm especially averse to that sort of thing), moving it worked. Well, at least this isn't something I'm submitting to a client. It's all me. A Mac user will have to dig around a lot in the App, and a PC user would have to crack open the EXE, so no one will see it. Besides, 99% of people wouldn't know what they are looking at anyway B^) Thanks, Mattia! 2009/7/14 Mattia Barbon <[email protected]>: > Dodger wrote: >> >> I just get: >> Subthread: Processing queue item /Applications/Poser 7/Runtime/kuyg.pz2 >> ST: working: /Applications/Poser 7/Runtime/kuyg.pz2 >> thread failed to start: lock can only be used on shared values at >> PolymorphLayout.pl line 825. >> >> Line 825 is the one that says: >> $wip = Wx::PlThreadEvent->new(-1, $qWorkEVT, >> $pct_done); > > I get this error in the thread event sample if I load Wx before > threads::shared. Have you checked if someting is loading Wx before you > load threads::shared? > > HTH, > Mattia > > -- Dodger
