Message58961
> I attached a patch with a more complete test of kqueue. It's not that
> great, but it's a thing. I've only tested on OS X, but it works.
A small unit test is better than no unit test :)
> Regarding the ability of building an epoll object from a fd, it might be
> usefull in some corner cases, but that's not a priority.
>
It should be trivial to add an epoll.fromfd() classmethod.
> exarkun looked at the patch and told me that there may be some
> threadsafety issues: for example, when calling epoll_wait, you use
> self->evs unprotected. It's not very important, but you may want to tell
> it in the documentation.
I found an interesting article about epoll. It states that epoll_wait()
is thread safe. Ready lists of two parallel threds never contain the
same fd.
http://lwn.net/Articles/224240/
It's easier to remove the buffer and allocate memory inside the wait()
method than to add semaphores. It makes the code.
> As you started the rich comparison for kevent objects, it may be
> interesting to have full comparison (to sort list of events). It's not a
> high priority though.
What do you suggest as sort criteria? |
|
| Date |
User |
Action |
Args |
| 2007-12-22 11:09:05 | christian.heimes | set | spambayes_score: 0.039692 -> 0.03969196 recipients:
+ christian.heimes, therve |
| 2007-12-22 11:09:05 | christian.heimes | set | spambayes_score: 0.039692 -> 0.039692 messageid: <[email protected]> |
| 2007-12-22 11:09:05 | christian.heimes | link | issue1657 messages |
| 2007-12-22 11:09:03 | christian.heimes | create | |
|