wxLin message queue freezing for >60s

Volker Bartheld dr_versaeg at freenet.de
Mon Jan 7 09:55:13 PST 2008


Hi!

On a LINUX (wxLin2.8.6) system I have evidence that sometimes, when a
worker thread sends a notification to the main thread's class derived from
wxApp (using a custom event that was created via DEFINE_EVENT_TYPE) the
whole wxWidgets event system freezes for around a minute (or even more),
then continues with just that custom event and all the other that might
have accumulated.

The code is basically built on
http://www.wxwidgets.org/wiki/index.php/Inter-Thread_and_Inter-Process_communication#Inter-Thread-Communication
and the only noticeably difference to a sample that works is, that my
custom events can have quite a large string attached to it [less than 1k or
so, via wxCommandEvent::SetString()] sent at a rate of up to 10Hz.

This happens very rarely and I wasn't able to reproduce that behaviour in
wxMSW, however.

Anything I should know about the specialties of message/event handling in
wxLin? I'm thinking about using wxCommandEvent::Set/GetClientData() with
objects on the heap since this might considerably decrease the overhead
that comes with string-handling.

What's your opinion? Any bells ringing?

THX in advance and have a nice evening,
Volker



-- 
mailto:  V B A R T H E L D at G M X dot D E






More information about the wx-users mailing list