You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying out native-netty-plot demo which is about running java code in native-image isolates. I made some changes in the demo after which example is blocking. HTTP Client making requests to netty server is blocking waiting for response. On further investigation, I found out code is blocking on Isolates.tearDownIsolate(renderingContext); call.
Below is the original code which I modified - mainly using logger library logback and making network call using Apach Http clients. I would like to know under what circumstances tearDownIsolate call will block? and How to investigate it further.
@CEntryPoint
private static ObjectHandle plotAsSVG(@CEntryPoint.IsolateThreadContext IsolateThread renderingContext, IsolateThread nettyContext, ObjectHandle functionHandle, double xmin, double xmax) {
//long initialMemory = printMemoryUsage("Rendering isolate initial memory usage: ", 0);
/ * Resolve and delete the functionHandle, now that execution is in the rendering isolate. * /
String function = ObjectHandles.getGlobal().get(functionHandle);
ObjectHandles.getGlobal().destroy(functionHandle);
//byte[] svgBytes = ImageSingletons.lookup(Graphics2DPlotter.class).plotAsSVG(function, xmin, xmax);
byte[] svgBytes = ImageSingletons.lookup(XYZRunner.class).run(function, xmin, xmax);
ObjectHandle byteBufferHandle;
try (PinnedObject pin = PinnedObject.create(svgBytes)) {
byteBufferHandle = createByteBuffer(nettyContext, pin.addressOfArrayElement(0), svgBytes.length);
}
//printMemoryUsage("Rendering isolate final memory usage: ", initialMemory);
return byteBufferHandle;
}
The text was updated successfully, but these errors were encountered:
I am trying out native-netty-plot demo which is about running java code in native-image isolates. I made some changes in the demo after which example is blocking. HTTP Client making requests to netty server is blocking waiting for response. On further investigation, I found out code is blocking on
Isolates.tearDownIsolate(renderingContext);
call.Below is the original code which I modified - mainly using logger library logback and making network call using Apach Http clients. I would like to know under what circumstances tearDownIsolate call will block? and How to investigate it further.
The text was updated successfully, but these errors were encountered: