GNOME Bugzilla – Bug 767730
Low priority source revents value coming wrongly to application
Last modified: 2018-05-24 18:57:00 UTC
When we have both low priority and high priority source event landing simultaneously with revents set to 1 in poll(), low priority event is ignored in check() function. At the start of next loop cycle, prepare() saw the revents value of low priority source as 1 (got in previous cycle) and set its ready flag.But this is not processed. revents of all the sources is set to 0 in query() function before poll(). poll() happened, at which revents of low priority source is coming as 0. At this time, only ready flag set by prepare() at the start of loop is considered and current revents is sent to application through dispatch(). This looks inconsistent, as ready flag is set by previous poll(), but revents of current poll is sent.
Created attachment 329900 [details] Code changes for the described scenario The number of ready descriptors to be processed is got from prepare() function. And this value is used to process the pending sources, before going to next poll(). Tested and couldn't see any performance problem with this. Please review the same.
Please, do not play with the Bugzilla priority fields — they are not for you to set. Also, it's bad form to add random people to the Cc list of a bug.
(In reply to Emmanuele Bassi (:ebassi) from comment #2) > Please, do not play with the Bugzilla priority fields — they are not for you > to set. > > Also, it's bad form to add random people to the Cc list of a bug. ok, sorry.
(In reply to madana gopal from comment #3) > (In reply to Emmanuele Bassi (:ebassi) from comment #2) > > Please, do not play with the Bugzilla priority fields — they are not for you > > to set. > > > > Also, it's bad form to add random people to the Cc list of a bug. > > ok, sorry. could anybody, please review this and share the comments
Could anybody, please review and share comments
Could anybody, please review and share comments. I am waiting for the suggestions.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1174.