Search:

Type: Posts; User: bbr201

Search: Search took 0.10 seconds.

  1. Thread: synchronization

    by bbr201
    Replies
    6
    Views
    2,075

    Re: synchronization

    Ahh, I think I see what you are saying. If it wasn't set up this way, it's actually possible that the separate thread could set isPaused to false AND execute notify() before the animator thread...
  2. Thread: synchronization

    by bbr201
    Replies
    6
    Views
    2,075

    Re: synchronization

    I think my problem is that I understand synchronization, but I'm not understanding how it works here.

    1. pauseGame() is called and isPaused is set to true.

    2. the animator thread will check...
  3. Thread: synchronization

    by bbr201
    Replies
    6
    Views
    2,075

    Re: synchronization

    I have a basic understanding of a mutex, but not a lot of hands on experience with threads in general. Basically, my understanding is that all code in synchronized blocks is known as the monitor, and...
  4. Thread: synchronization

    by bbr201
    Replies
    6
    Views
    2,075

    Re: synchronization

    Oops, apparently the answer is yes, it does release the lock. But what is the point of synchronizing anything? According to the author, a boolean cannot be read by one thread and changed by another...
  5. Thread: synchronization

    by bbr201
    Replies
    6
    Views
    2,075

    synchronization

    hi all,

    i haven't worked with threads much, and i have a question about how synchronzied would work in this situation. here is a stripped down example of a game class:

    public class GamePanel...
Results 1 to 5 of 5