37 lines
708 B
Java
37 lines
708 B
Java
package SeSim;
|
|
|
|
public class TraderRun extends Thread {
|
|
|
|
public String tname = "";
|
|
public Exchange ex;
|
|
|
|
@Override
|
|
public void run() {
|
|
while (true) {
|
|
try {
|
|
sleep(100);
|
|
} catch (InterruptedException e) {
|
|
System.out.println("Interrupted");
|
|
}
|
|
|
|
/*
|
|
System.out.printf("%s locking\n", tname);
|
|
ex.Lock();
|
|
System.out.printf("%s locked\n", tname);
|
|
|
|
try{
|
|
sleep(1000);
|
|
}
|
|
catch(InterruptedException e) {
|
|
System.out.println("Interrupted");
|
|
}
|
|
|
|
System.out.printf("%s unlocking\n", tname);
|
|
// ex.Free();
|
|
System.out.printf("%s unlocked\n", tname);
|
|
*/
|
|
}
|
|
}
|
|
|
|
}
|