[fpc-devel] daemonapp 100% cpu easting fix
Michael Van Canneyt
michael at freepascal.org
Mon Nov 19 13:34:17 CET 2007
On Mon, 19 Nov 2007, Micha Nelissen wrote:
> Michael Van Canneyt wrote:
> > On linux, everything comes down to polling. The only non-polling solution,
> > signals, are not suitable since you don't know in which thread the signal
> > ends up, and you must start using complicated inter-thread communication.
>
> Use fpsigaction to mask the signal in the threads you don't want it? Perhaps
> this is already done so that all signals end up in main thread.
I don't think sigaction works on the thread level ?
>
> Anyway, I thought you mentioned a socket? You can do a blocking read on that?
Ok, I see there is a difference in my and your interpretation of polling :-)
Yes, you can, but you'll need a fpselect() for the timeout as it is now:
The thread which handles control messages uses a polling mechanism, this
could be changed to a blocking mechanism since it is running in a separate
thread anyway.
Michael.
More information about the fpc-devel
mailing list