Use of select() to poll a file (device)
Richard Danter
radanter at googlemail.com
Fri Nov 2 01:53:40 PDT 2007
> 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.
Threads it is then :)
>
> In 2.9 you can/will be able to add an FD to the main event loop but it's
> still work in progress.
Thanks for the help!
Rich
More information about the wx-users
mailing list