Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39161
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2019-09-30 00:32 -0700 |
| Message-ID | <55e14769-2ee7-4e11-8f66-69c1b7bf0241@googlegroups.com> (permalink) |
| Subject | Thread and synchonized question |
| From | mike <mikaelpetterson@hotmail.com> |
Hi, We have class A with method synchronized connect(int) that calls class B that has synchronized connect() (main thread) I guess the lock will be on class A? What if class B and synchronized connect()is called by another thread ( reconnect thread) I guess lock is on class B. So does this mean that both main and reconnect threads can access the synchronized connect() on class B? br, //mike
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Thread and synchonized question mike <mikaelpetterson@hotmail.com> - 2019-09-30 00:32 -0700
Re: Thread and synchonized question Andreas Leitgeb <avl@logic.at> - 2019-09-30 10:10 +0000
Re: Thread and synchonized question mike <mikaelpetterson@hotmail.com> - 2019-09-30 04:38 -0700
Re: Thread and synchonized question Andreas Leitgeb <avl@logic.at> - 2019-09-30 13:48 +0000
Re: Thread and synchonized question Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-09-30 17:07 -0400
Re: Thread and synchonized question Arne Vajhøj <arne@vajhoej.dk> - 2019-09-30 19:48 -0400
csiph-web