R
Richard Maher
Hi,
I've got this: -
.. The best Applet infrastructure on the planet
.. Static arraylist of Sessions
.. Each Session has a TCP/IP Network Connection
.. Each connection has a Reader thread
Now, I can share memory beautifully between tabs/pages like there's no
tomorrow with the lovely single Reader thread covering all server-return
messages *until* there are no active pages for the applet. (I define
"active" as *any* page that has invoked the applet).
IOW, I provide a check-box which lets the user say "continue to live even
after the last page that referenced you has died" and it all looks sexy with
the connection et al hibernating till another page that references the
Applet is loaded. (You're getting excited I know; this really is that awe
inspiring!) Now I know the socket lives (many historical examples) and the
server receives my Applet's "send" but when the response is received in the
reader thread I get the dreaded "ThreadDeath" Error (not used to Errors
still strugling with Exceptions
So,
.. Does the thread have to die with the last Applet reference? (No problem, I
can code for that)
.. What is the Java Socket equivalent of a CANCEL() that will leave the
connection up but terminate the READ() so that the thread will be informed
to die?
.. I can re-create a Reader Thread next time Applet-RefCnt = 1
.. I can't kill the conneection; I need a SOFT stop-the-pending-read-and-die
thread method (but leave the socket up for Lazurus to use)
Cheers Richard Maher
I've got this: -
.. The best Applet infrastructure on the planet
.. Static arraylist of Sessions
.. Each Session has a TCP/IP Network Connection
.. Each connection has a Reader thread
Now, I can share memory beautifully between tabs/pages like there's no
tomorrow with the lovely single Reader thread covering all server-return
messages *until* there are no active pages for the applet. (I define
"active" as *any* page that has invoked the applet).
IOW, I provide a check-box which lets the user say "continue to live even
after the last page that referenced you has died" and it all looks sexy with
the connection et al hibernating till another page that references the
Applet is loaded. (You're getting excited I know; this really is that awe
inspiring!) Now I know the socket lives (many historical examples) and the
server receives my Applet's "send" but when the response is received in the
reader thread I get the dreaded "ThreadDeath" Error (not used to Errors
still strugling with Exceptions
So,
.. Does the thread have to die with the last Applet reference? (No problem, I
can code for that)
.. What is the Java Socket equivalent of a CANCEL() that will leave the
connection up but terminate the READ() so that the thread will be informed
to die?
.. I can re-create a Reader Thread next time Applet-RefCnt = 1
.. I can't kill the conneection; I need a SOFT stop-the-pending-read-and-die
thread method (but leave the socket up for Lazurus to use)
Cheers Richard Maher