Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #21697

Detection of socket connecting process, two thread problem

Newsgroups comp.lang.java.programmer
Date 2013-01-25 00:17 -0800
Message-ID <53a99ae7-6ff8-42d6-87f6-822a0310a475@googlegroups.com> (permalink)
Subject Detection of socket connecting process, two thread problem
From artik <olsztyn.arti@gmail.com>

Show all headers | View raw


Hi,
I use one socket and two threads with it: one for reading and one for writing to it. My problem is in moment when error occurs and two thread want to do connection again on the same socket by closing the secont at start. Result of this is that while one one thread (the firtst of catching error) wants to start reconnecting the second one close socket to perform it for reconnecting. Classic dead lock. Therefore I ask about possibility to read state of socket exactly state of try to connecting?

Regards,
Artik

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Detection of socket connecting process, two thread problem artik <olsztyn.arti@gmail.com> - 2013-01-25 00:17 -0800
  Re: Detection of socket connecting process, two thread problem Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-25 00:40 -0800
    Re: Detection of socket connecting process, two thread problem artik <olsztyn.arti@gmail.com> - 2013-01-25 02:33 -0800
      Re: Detection of socket connecting process, two thread problem Knute Johnson <nospam@knutejohnson.com> - 2013-01-25 10:11 -0800

csiph-web