Original Post
Hi, does anyone know if the following code would stall in Java with multithreading? : Ok, now it would be used like this: Thread 1:
class MyObject {
public void testStall() {
MyStaticClass.myFunction(this);
}
}
static class MyStaticClass {
static public void myFunction(MyObject obj) {
//do something with obj
}
}
loop {
myObject.testStall();
}
Thread 2:
loop {
myObject.testStall();
}
So, will this stall or is it perfectly safe? Thank you!