Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Anonymous Monk
on Jul 24, 2021 at 05:32 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-23 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found