commit 11/04/2025
This commit is contained in:
@@ -583,6 +583,7 @@ public class CaptureView {
|
||||
});
|
||||
|
||||
Thread uploadThread = new Thread(uploadtask);
|
||||
uploadThread.setName("UploadThread MedicalRecordID="+prefix);
|
||||
uploadThread.setDaemon(true);
|
||||
uploadThread.start();
|
||||
|
||||
@@ -667,6 +668,7 @@ public class CaptureView {
|
||||
if (indexleft90!=-1){
|
||||
final int finalindex = indexleft90;
|
||||
Thread c1 = new Thread(()-> SetupCameraWithController(image1, camleft90, finalindex));
|
||||
c1.setName("SetupCameraWithController "+camleft90);
|
||||
c1.setDaemon(true);
|
||||
c1.start();
|
||||
}
|
||||
@@ -681,6 +683,7 @@ public class CaptureView {
|
||||
if (indexleft45!=-1) {
|
||||
final int finalindex = indexleft45;
|
||||
Thread c2 = new Thread(()-> SetupCameraWithController(image2, camleft45, finalindex));
|
||||
c2.setName("SetupCameraWithController "+camleft45);
|
||||
c2.setDaemon(true);
|
||||
c2.start();
|
||||
}
|
||||
@@ -695,6 +698,7 @@ public class CaptureView {
|
||||
if (indexcenter!=-1) {
|
||||
final int finalindex = indexcenter;
|
||||
Thread c3 = new Thread(()-> SetupCameraWithController(image3, camcenter, finalindex));
|
||||
c3.setName("SetupCameraWithController "+camcenter);
|
||||
c3.setDaemon(true);
|
||||
c3.start();
|
||||
}
|
||||
@@ -709,6 +713,7 @@ public class CaptureView {
|
||||
if (indexright45!=-1) {
|
||||
final int finalindex = indexright45;
|
||||
Thread c4 = new Thread(()-> SetupCameraWithController(image4, camright45, finalindex));
|
||||
c4.setName("SetupCameraWithController "+camright45);
|
||||
c4.setDaemon(true);
|
||||
c4.start();
|
||||
}
|
||||
@@ -724,6 +729,7 @@ public class CaptureView {
|
||||
if (indexright90!=-1) {
|
||||
final int finalindex = indexright90;
|
||||
Thread c5 = new Thread(()-> SetupCameraWithController(image5, camright90, finalindex));
|
||||
c5.setName("SetupCameraWithController "+camright90);
|
||||
c5.setDaemon(true);
|
||||
c5.start();
|
||||
}
|
||||
@@ -930,6 +936,7 @@ public class CaptureView {
|
||||
});
|
||||
|
||||
Thread checkpatientIDThread = new Thread(checkpatientID);
|
||||
checkpatientIDThread.setName("CheckPatientID barcode="+barCode);
|
||||
checkpatientIDThread.setDaemon(true);
|
||||
checkpatientIDThread.start();
|
||||
|
||||
|
||||
@@ -98,12 +98,15 @@ public class MainApplication extends Application {
|
||||
public void stop() throws Exception {
|
||||
Logger.info("Application stopped");
|
||||
super.stop();
|
||||
System.out.println("Checking running threads...");
|
||||
Map<Thread, StackTraceElement[]> allThreads = Thread.getAllStackTraces();
|
||||
for(Thread thread : allThreads.keySet()){
|
||||
System.out.println("Thread: " + thread.getName()+", State: " + thread.getState()+", Daemon: " + thread.isDaemon());
|
||||
//thread.interrupt();
|
||||
if (!allThreads.isEmpty()){
|
||||
System.out.println("Checking running threads...");
|
||||
for(Thread thread : allThreads.keySet()){
|
||||
System.out.println("Thread: " + thread.getName()+", State: " + thread.getState()+", Daemon: " + thread.isDaemon());
|
||||
//thread.interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
Reference in New Issue
Block a user