|
Advertisement
|
Forum posts by Steve Que:1 page [ 1 ]
Posted in Java Answers Forum, Feb 25, 2002, 10:00 AM
Thanks for your kindly help. However, I want to pinpoint that all "data A"s are recorded within 1st thread and all "data B"s are recorded within 2nd thread.If 1st thread successfully called the synchronized method "doWrite()" and locked the object. 2nd thread should not be able to write "data B" into the log file until 1st thread finished...
Posted in Java Answers Forum, Feb 25, 2002, 6:01 AM
Hi,I've programmed a servlet that would call a synchroized method in a threading environment.In servlet,public void doGet(...){ SMAThreadPost tp = new SMAThreadPost(session, context, input_msg, userip); tp.start(); ...}In threading class,public synchronized boolean doWrite(){ while(...) { } ...}public void run(){ try { boolean status =...
1 page [ 1 ]
|