Queria sabes si se puede hacer que un servicio web tenga hilos dentro para algunas tareas y uno de los hilos haga el return(que será el response al cliente)??
Es posible esto???
por ejemplo:
El modo clasico:
Código PHP:
   public class Math {
    public float add(float a, float b) {
        return a+b;
    }
} 
    Código PHP:
   public class Math {
    public float add(float a, float b) {
          // Create and start the thread
    Thread thread = new BasicThread1(a,b);
    thread.start();
    }
}
 
class BasicThread1 extends Thread {
        // This method is called when the thread runs
        int a;
        int b;
        public BasicThread1(int a,int b){
            this.a = a;
            this.b = b;
        }
        public void run() {
            return a+b;
        }
    } 
    
 
