I have a threadpool object and a threaduser object. Threapool (as it sounds) makes a threadpool for threaduser to use. The threaduser uses a query to get threadpool location. Once I have the location, I try to access a public method of the threadpool class. but i get an “Cannot find symbol” error.
public void onStart() throws Exception {
BOrd location = getThreadpoolLocation();
BITable result = (BITable)location.resolve().get();
@SuppressWarnings({ "unchecked" })
TableCursor<BProgram> cursor = result.cursor();
while(cursor.next()){
thread = cursor.get();
}
}
public void onExecute() throws Exception {
if (thread == null) {
onStart();
}
// Create and enqueue a task to the shared thread pool
thread.code.Source.enqueueTask(() -> { // I get an error here
executeTask();
});
}
public void onStop() throws Exception {
// Cleanup code if necessary
}
// Reference to the shared thread pool
BProgram thread;
Edit: If you guys know a better way of finding the program object rather that doing the query, do let me know. Queries are way too slow to be used at a large scale.