1 // Test for thread-local allocation problems.
3 import java
.util
.HashMap
;
4 import java
.util
.Observable
;
5 import java
.util
.Observer
;
7 class PR18699
extends Observable
implements Runnable
, Observer
{
9 public static void main(String
[] args
) throws InterruptedException
{
10 PR18699 PR18699_1
= new PR18699();
11 PR18699 PR18699_2
= new PR18699();
12 PR18699_1
.addObserver(PR18699_2
);
13 PR18699_2
.addObserver(PR18699_1
);
14 new Thread(PR18699_1
).start();
15 new Thread(PR18699_2
).start();
24 for (int i
= 0; i
< 200; i
++)
25 s
+= String
.valueOf(i
);
26 this.notifyObservers(s
);
30 HashMap map
= new HashMap();
32 public void update(Observable o
, Object obj
)