socket server interrupt?
maximilianscherr
MaximilianScherr at T-Online.de
Thu Feb 14 18:48:16 EST 2002
is there any possibiliy to close the server thread(s) (im using
SocketServer)?
--- In python-list at y..., "Cliff Wells" <logiplexsoftware at e...> wrote:
> In article <mailman.1013690723.25180.python-list at p...>,
> "maximilianscherr" <MaximilianScherr at t...> wrote:
> > how can i make my socket server interrupt on ctr-c(i know with the
> > keyboardinterrupt exception, but how?)?
>
> The problem you will have with this approach is that your server is
> multi-threaded; you won't know which thread will receive the
interrupt.
> A better alternative is to start yet another thread that accepts
console
> input and can shut the server down using a command, say 'q' or 'x'.
>
> - Cliff
> --
> http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list