@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

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to