comp.lang.ada
 help / color / mirror / Atom feed
* Ada Thread Termination
@ 2008-02-02 19:41 shaunpatterson
  2008-02-02 19:55 ` Dmitry A. Kazakov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: shaunpatterson @ 2008-02-02 19:41 UTC (permalink / raw)


I have a socket listening thread that I would like to be able to
terminate via a select call.

task body Socket_Listener is
  begin
     accept Initialize do
           -- setup
     end Initialize;

     loop
           Listen_For_Message;
     end loop;
  end Socket_Listener

I would like to have another accept statement inside the loop to break
out of the loop.

Listen_For_Message is actually a call to a blocking socket read, so
the call may not finish if nothing else comes through the socket. I'm
not sure how to structure this thread so it can be terminated on
demand.

Any ideas?

Thanks

--
Shaun



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-04 23:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-02 19:41 Ada Thread Termination shaunpatterson
2008-02-02 19:55 ` Dmitry A. Kazakov
2008-02-02 21:23 ` gpriv
2008-02-04 17:57 ` Adam Beneschan
2008-02-04 23:26   ` Robert A Duff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox