How to interrupt Socket.Select(...) when list of socket changes or for termination

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 1200cubic
    New Member
    • Mar 2010
    • 1

    How to interrupt Socket.Select(...) when list of socket changes or for termination

    Hello,
    How is it possible to interrupt Socket.Select() ? I'm calling
    Socket.Select() in a worker thread. When new sockets are added (from another
    thread) I want to interrupt the Select() so it can get restarted with the new
    sockets being added. This has to happen quickly so I can't wait for the
    timeout. Thread.Interrup t() seems to do nothing.
    Setting short timeouts will result in CPU load, because the lists of sockets, supplied to Socket.Select(. ..), have to be reloaded each time. Thus short timeouts are no option.

    Thanks in advance,
    me
Working...