I could not make the require work. First, I removed the "use SexCoder" from the top of my script. Then I added this:
MCE::Hobo->init(on_start => sub { require SexCoder; });
The error message I got was:
Hobo 30016 terminated abnormally: reason Can't locate object method "n
+ew" via package "SexCoder" (perhaps you forgot to load "SexCoder"?) a
+t ./convert.mce line 721, <__ANONIO__> line 24.
So, the SexCoder did not load. I then tried removing the Hobo->init and placing "use SexCoder" inside my worker sub {}. That was no different than my original code. I had exactly the same issue, where some workers were able to get results from the service and others were not. That really confuses me. I think you are on the right track, though. There must be something odd in my SexCoder package that I'm not seeing. See my reply to cavac above for the complete code to that package. Maybe you can see something?
I have one more tidbit for everyone helping me. The code works if $num_workers = 1 (simulating single-threaded code). That's why I suspect an issue with Inline::Java or with the rtsClient itself.
I just can't fathom why if each is running in its own process.
|