kopia lustrzana https://github.com/micropython/micropython-lib
select: Add simple epoll test.
rodzic
d8e0383f55
commit
7251b8f820
|
@ -0,0 +1,10 @@
|
||||||
|
import select
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
ep = select.epoll()
|
||||||
|
ep.register(0, select.EPOLLIN)
|
||||||
|
res = ep.poll(2000)
|
||||||
|
print(res)
|
||||||
|
for ev, fd in res:
|
||||||
|
print(os.read(fd, 256))
|
Ładowanie…
Reference in New Issue