Message94544
Martin, thanks for your responses. In regards to point three:
Kqueue's are not just used for file descriptors. I believe this is the
reason why the ident field is a uintptr_t and not an int.
The example I gave was for kqueue timers. Since the operating system
does not allocate 'timer descriptors' for you, I decided to use the
return value from the id function.
Here is some code that demonstrates:
import select
a = 1
b = id(a)
c = select.kevent(a)
d = select.kevent(b)
assert a == c.ident
assert b == d.ident
assert b & (1<<32) - 1 == d.ident
The second assert will fail on 64 bit systems if 'b' is too big.
Anyway, I will try to come up with a patch for this. |
|
Date |
User |
Action |
Args |
2009-10-27 00:52:08 | mbroughton | set | recipients:
+ mbroughton, loewis, therve, christian.heimes |
2009-10-27 00:52:07 | mbroughton | set | messageid: <1256604727.82.0.602372469923.issue7211@psf.upfronthosting.co.za> |
2009-10-27 00:52:06 | mbroughton | link | issue7211 messages |
2009-10-27 00:52:06 | mbroughton | create | |
|