Hi all.
I'm currently involved in a (at least for me) obscure part of Java: synchronization.
I have some multithreaded apps that will want to access some resources all at a time and without interfernce.
My first thought was just use se synchornized keyword and let the JVM do its job but some other constraints forced me to design my own synchronization mechanism.
Of course, I'm not inventing the wheel so I'm using the old wait and notify methods.
My concern now is about execution order: the JVM spec says that once you wait() the order followed to notify() is not guaranteed. That looks pretty random for me.
I've used all this stuff for ages without no problem, and I think I will ignore this again but ... does anyone have experience with this in terms of changed execution order?
Cheers,
Dian
I'm currently involved in a (at least for me) obscure part of Java: synchronization.
I have some multithreaded apps that will want to access some resources all at a time and without interfernce.
My first thought was just use se synchornized keyword and let the JVM do its job but some other constraints forced me to design my own synchronization mechanism.
Of course, I'm not inventing the wheel so I'm using the old wait and notify methods.
My concern now is about execution order: the JVM spec says that once you wait() the order followed to notify() is not guaranteed. That looks pretty random for me.
I've used all this stuff for ages without no problem, and I think I will ignore this again but ... does anyone have experience with this in terms of changed execution order?
Cheers,
Dian