I must apologize if my idea is unclear. But you’re quite right, a notify() call is not needed everytime, but for security it is recommended to notify when exiting a synchronized block. As a matter of fact, though original Thread implementations do share on memory addresses references it is often the case that, when a data buffer or a variable is accessed by multiple Threads, the variable get on failure if it is read while another Thread is writing on it. That is such a mapping synch’, which is impl. throughout synchronized Collections views, i.e. Collections.synchronizedMap/List/Set etc…
For example, say you want to animate your player with several images, if the animator don’t synchronize on some monitor, the unsynchronized paint method will fail to find the correct index values to fetch the image. Thereafter if the animator keeps running for a period of time, not notifying release of the monitor would produce a dead-lock on painting, because the monitor is always re-acquired by the first animator Thread. Do you now better understand the idea of notifying? It’s like sending messages to a mail-box and get notified when the mail-box receives new messages.
The finer points of threading are currently over my head. Do either of you want WRITE access to the CVS? (I am also unsure about Applet threads, e.g. calling an Applet method via JavaScript…I’ve heard that start(), stop(), etc. are executed by a different thread, but I really don’t know how this stuff all plays together.
Thanks,
JLA
Well this was about performances issue you’re asking for. I don’t want to get you bored with my “expert-explanations”… cu
I’m not totally sure threading is a big problem at this point…the graphic slow down issues have been resolved. Occasionally when loading a game, there will be a thread incident, but I think overall everything works well. I agree that the threading situation is not legit, but I don’t see the negative consequences at this point.
Thanks for your help,
JLA
As an aside, do you have any plans for supporting full-screen mode? I think JStella is great, but would be even better when being able to play full screen
I’d also agree…
I tried it once with disastrous results (on account of my experience with it). If anyone wants to take a stab at it (or take over the project), let me know. Medical school is devouring all my time.
JLA