[Gambas-user] File watching behaviour
Benoît Minisini
gambas at ...1...
Fri Jan 2 03:28:56 CET 2015
@Jussi : I introduce a new thread for the problem. Now for the new year
people will always create a new thread for a new topic. :-)
In revision #6791 I made the following changes:
- If a watched file descriptor is ready to read, but has no data, then
the watch is not automatically stopped anymore.
- If the event loop is called too often (because of the last change), I
make the interpreter sleep a bit (up to 10 ms), so that the CPU is not
eaten.
Now the expected problems:
- This is not backward compatible. Maybe I should introduce a new
syntax. For example adding the "CONTINUE" keyword after the "WATCH"
keyword to keep watching.
- Only the interpreter event loop has the little sleep. Not gb.qt4,
gb.sdl, gb.gtk and gb.gtk3. So you may eat 100% CPU with these
components. I will try to find a solution for that.
People, please tell me what you think about that. Especially Ron that
has the program that watch the biggest number of file descriptors. :-)
Regards,
--
Benoît Minisini
More information about the User
mailing list