Use of select() to poll a file (device)
Vadim Zeitlin
vadim at wxwidgets.org
Thu Nov 1 17:14:15 PDT 2007
On Thu, 1 Nov 2007 20:59:39 +0000 Richard Danter <radanter at googlemail.com> wrote:
RD> How can I do this within the wxWidgets event loop?
There is no good way to do it with wx 2.8. The best I can suggest is to
use a separate thread for IO. If you're not comfortable with using threads,
you can try to multiplex select and GUI events in the main thread by either
using idle events or dispatching GUI events when select times out but this
will never be anything more than an ugly hack.
In 2.9 you can/will be able to add an FD to the main event loop but it's
still work in progress.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list