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

Commit84f3cbb

Browse files
author
Paul Sokolovsky
committed
select: Add epoll.unregister() method.
1 parent808b492 commit84f3cbb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎select/select.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ def register(self, fd, eventmask=EPOLLIN|EPOLLPRI|EPOLLOUT, retval=None):
4242
r=epoll_ctl(self.epfd,EPOLL_CTL_MOD,fd,s)
4343
os.check_error(r)
4444

45+
defunregister(self,fd):
46+
# Pass dummy event structure, to workaround kernel bug
47+
r=epoll_ctl(self.epfd,EPOLL_CTL_DEL,fd,self.evbuf)
48+
os.check_error(r)
49+
4550
defpoll(self,timeout=-1):
4651
s=bytearray(self.evbuf)
4752
n=epoll_wait(self.epfd,s,1,timeout)

‎select/setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
fromsetuptoolsimportsetup
66

77
setup(name='micropython-select',
8-
version='0.0.2',
8+
version='0.0.3',
99
description='select module to MicroPython',
1010
url='https://github.com/micropython/micropython/issues/405',
1111
author='Paul Sokolovsky',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp