Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^3: Inline::Java with MCE::Hobo

by Anonymous Monk
on Jul 24, 2021 at 05:32 UTC ( #11135355=note: print w/replies, xml ) Need Help??

in reply to Re^2: Inline::Java with MCE::Hobo
in thread Inline::Java with MCE::Hobo

Greetings eraskin,

Have you tried importing SexCoder inside the input_task Hobo routine. This is where to load the class uniquely per worker child.

sub input_task { require SexCoder; SexCoder->import(); # THIS CALLS JAVA TO CREATE THE CONNECTION TO DATA SERVICES my $sexcoder = SexCoder->new("$ds_server", 4000); ... }

Replies are listed 'Best First'.
Re^4: Inline::Java with MCE::Hobo
by Anonymous Monk on Jul 24, 2021 at 05:38 UTC

    Kind reminder: Remember to comment out SexCoder at the top of the script to ensure the class is loaded by each Hobo worker individually.

    my $num_workers = 5; # use SexCoder; use MCE::Hobo; use MCE::Shared; ...

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135355]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2021-10-18 00:17 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (72 votes). Check out past polls.