Search:

Type: Posts; User: Norm

Search: Search took 0.22 seconds.

  1. Replies
    9
    Views
    2,037

    Re: can't use the file declared in other thread

    Having the update method be synchronized will prevent more than one thread executing it at the same time.
  2. Replies
    9
    Views
    2,037

    Re: can't use the file declared in other thread

    The code in the two threads should call a single synchronized method that does the updates to the disk file to prevent collisions. That assumes that there is some control over what order the data is...
  3. Replies
    9
    Views
    2,037

    Re: can't use the file declared in other thread

    Are you confusing the concepts of an execution time thread that allows method execution and an instance of a class that extends the Thread class?
    Defining and accessing variables defined in...
Results 1 to 3 of 3