On Thu, 12 Dec 2024, Teh, Chee Yong wrote:

CORPORATE

Hi Andi,

I have question related to running a wrapped function in a multithreading/multiprocess environment in python.

We have a java library and we wrapped it using JCC so we can call it from python.

We have a list of data that we need to call a wrapped function for each of the data in the list.

Everything works fine when we call it in a single threaded env but the process is slow as it's sequential. Now we are trying to speed up the process by calling this function on multiple thread.

I tried to call the initVM on the "main" thread then on each of new thread I will call attachCurrentThread (begin) and detachCurrentThread (end). This doesn't seem to work properly as we getting some weird VM issue.

Please explain what "some weird VM issue" is. How can I help you otherwise ?

What is the best way to do multithread using JCC?

What you're doing seems correct, iirc.

Andi..


Thanks,

Chee Yong
------------------------------------------------------------------------------------------------------------

Please read these warnings and restrictions:
This e-mail transmission is strictly confidential and intended solely for the 
ordinary user of the e-mail address to which it was addressed. It may contain 
legally privileged and/or CONFIDENTIAL information.
The unauthorised use, disclosure, distribution and/or copying of this e-mail or 
any information it contains is prohibited and could, in certain circumstances, 
constitute a criminal offence.
If you have received this e-mail in error or are not an intended recipient 
please inform London Stock Exchange Group (“LSEG”) immediately by return e-mail 
or telephone 020 7797 1000.
LSEG may collect, process and retain your personal information for its business 
purposes. For more information please see our Privacy Policy.
We advise that in keeping with good computing practice the recipient of this 
e-mail should ensure that it is virus free. We do not accept responsibility for 
any virus that may be transferred by way of this e-mail.
E-mail may be susceptible to data corruption, interception and unauthorised 
amendment, and we do not accept liability for any such corruption, interception 
or amendment or any consequences thereof.
Calls to London Stock Exchange Group may be recorded to enable LSEG to carry 
out its regulatory responsibilities.
For more details on the LSEG group of companies click here
London Stock Exchange Group plc
10 Paternoster Square
London
EC4M 7LS
Registered in England and Wales No 05369106

------------------------------------------------------------------------------------------------------------

Reply via email to