lkml.org 
[lkml]   [2001]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[OT] Interrupting select.
Date

I think that this is slightly off-topic, but I figure that
someone here knows the answer or where to point me to the
answer. Please respond privately so the entire list is not
spamed by the response.

I am writing a threaded network daemon using a thread per
connection model (I know, it is not the most effective, but
I can extend it to use a thread per N connections in the future).
That thread waits on a socket using select, or possibly merely
doing a read. Messages to be written are inserted into a queue
in shared memory. I am looking for a way to send the thread a
signal or event to cause the thread to abort the read or select
call when data is available.

I know that it would be possible to create a unix socket
and write a byte to that socket whenever data is available,
but there should be a simpler message or signal that I can
send to the thread to accomplish the same thing.

Thanks,
Laramie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.049 / U:11.872 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site