Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-79698: selector.EpollSelector: add new parameter to support extra events#11193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Zheaoli wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromZheaoli:bpo-35517

Conversation

@Zheaoli
Copy link
Contributor

@ZheaoliZheaoli commentedDec 17, 2018
edited by bedevere-appbot
Loading

rndrr reacted with thumbs up emojirndrr reacted with eyes emoji
Copy link
Contributor

@asvetlovasvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

A documentation update is needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

extra_events=0 maybe?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I preferNone, but noFalse plz.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

None?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

extra_events is a bitmask, whyNone?

Copy link
ContributorAuthor

@ZheaoliZheaoliDec 17, 2018
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

extra_events is a bitmask, whyNone?

In the most circumstance, people do not need the extra_events , so I give it a default value

@asvetlov

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

With0 default value people still don't need to passextra_events.
But we don't need to extra check the value forNone,0 should work fine asno flags for all possible selectors:poll,epoll,kqueue etc

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

that sounds a good idea. I will fix it! Thx!

@asvetlov
Copy link
Contributor

Shouldmodify() method be updated as well?
Should new argument be mentioned in the base abstract class?

Zheaoli reacted with thumbs up emoji

@zhangyangyu
Copy link
Member

zhangyangyu commentedDec 17, 2018
edited
Loading

After this change, we could pass more eventmask in, even wrong ones (not before since only read/write allowed). What to do with them?

Zheaoli and csabella reacted with thumbs up emoji

@Zheaoli
Copy link
ContributorAuthor

@zhangyangyu

In select module, people use it by passing event mask directly.
So, I think it's necessary to check the extra_events.

@ZheaoliZheaoliforce-pushed thebpo-35517 branch 2 times, most recently froma897190 to234f30eCompareDecember 17, 2018 15:47
@asvetlov
Copy link
Contributor

Regarding to check for invalid event mask: the underlying call toepoll (or another poller API) should raise an exception for invalid mask bits.
Why check them again inselectors?

@ZheaoliZheaoli changed the titlebpo-35517: selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVEbpo-35517: selector.EpollSelector: add new parameter to support extra eventsDec 17, 2018
@giampaolo
Copy link
Contributor

Icommented on the bug tracker.

@zhangyangyu
Copy link
Member

zhangyangyu commentedDec 18, 2018
edited
Loading

Why check them again in selectors?

@asvetlov It's the current status ofregister andmodify, see their docs:

This returns a new SelectorKey instance, or raises a ValueError in case of invalid event mask or file descriptor, or KeyError if the file object is already registered.

And IMHO, aValueError is easier to identify the root cause of the error than anOSError ofpoll. And as my test and understanding the manual, bothpoll andepoll_wait won't return error for invalid bitmask, it seems just pick the bitmask it thinks valid.

But it seems it's somewhat messy to implement the check. Relying on the users to always use constants inselect module is also acceptable.

MaxwellDupre

This comment was marked as outdated.

@erlend-aaslanderlend-aasland changed the titlebpo-35517: selector.EpollSelector: add new parameter to support extra eventsgh-79698: selector.EpollSelector: add new parameter to support extra eventsNov 8, 2024
@erlend-aasland
Copy link
Contributor

@Zheaoli, would you mind to resolve the conflicts and pull inmain?

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsbot added the staleStale PR or inactive for long period of time. labelApr 13, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@asvetlovasvetlovasvetlov left review comments

@zhangyangyuzhangyangyuzhangyangyu left review comments

@giampaologiampaoloAwaiting requested review from giampaolo

+2 more reviewers

@eamanueamanueamanu left review comments

@MaxwellDupreMaxwellDupreMaxwellDupre approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

awaiting core reviewstaleStale PR or inactive for long period of time.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

10 participants

@Zheaoli@asvetlov@zhangyangyu@giampaolo@erlend-aasland@eamanu@MaxwellDupre@the-knights-who-say-ni@ezio-melotti@bedevere-bot

[8]ページ先頭

©2009-2026 Movatter.jp