Commit Graph

219 Commits

Author SHA1 Message Date
Taiki Endo 1019f90247
Merge pull request #34 from smol-rs/next
Bump to v2.0.3
2021-03-20 19:56:05 +09:00
Taiki Endo fba6877b3c Skip test of async-io in MSRV 2021-03-20 19:44:57 +09:00
Taiki Endo 38441655db Bump to v2.0.3 2021-03-20 19:04:14 +09:00
Taiki Endo a11153d7b1
Merge pull request #32 from smol-rs/readme
Remove readme field from Cargo.toml
2021-02-14 20:03:44 +09:00
Taiki Endo 94adda1433 Remove readme field from Cargo.toml 2021-02-14 19:44:44 +09:00
Taiki Endo d963b53f0f
Merge pull request #31 from smol-rs/badge
Update license badge to match Cargo.toml
2021-02-14 14:06:13 +09:00
Taiki Endo 458d5c9101 Update license badge to match Cargo.toml 2021-02-14 13:36:54 +09:00
Koxiaet a04a265f9b Merge branch 'master' 2021-01-03 10:19:51 +00:00
Taiki Endo 2e27830522
Merge pull request #30 from taiki-e/url
Update URLs
2020-12-27 00:04:58 +09:00
Taiki Endo 99d9e20ba0 Update URLs 2020-12-26 23:47:13 +09:00
Taiki Endo 5aa15b58b0
Merge pull request #29 from taiki-e/deps
Update cfg-if to 1
2020-12-25 18:37:32 +09:00
Taiki Endo 84a3453537 Update cfg-if to 1 2020-12-25 18:30:50 +09:00
Taiki Endo 4e32cca7d3
Merge pull request #28 from taiki-e/compare_and_swap
Replace deprecated compare_and_swap with compare_exchange
2020-12-24 21:36:38 +09:00
Taiki Endo c009653b99 Replace deprecated compare_and_swap with compare_exchange 2020-12-24 21:18:55 +09:00
Taiki Endo 14c8d34655
Merge pull request #27 from taiki-e/ci
Fix CI
2020-12-24 18:35:49 +09:00
Taiki Endo 995f1b1091 Fix CI 2020-12-24 18:29:59 +09:00
Koxiaet 20c1e19c46 Have notifications break poll's operation loop 2020-12-18 15:03:59 +00:00
Koxiaet dd15b4cd8a Add logging to poll backend 2020-12-18 14:33:05 +00:00
Koxiaet e0789a8ee0 Make poll's poller modifications interrupt `wait` 2020-12-18 14:18:03 +00:00
Koxiaet 0f2f6ed15a Don't set CURRENT_WEEK in CI 2020-12-17 19:08:08 +00:00
Koxiaet 2fc0831d40 Use poll on VxWorks, Fuchsia and other Unix systems 2020-12-17 18:56:48 +00:00
Stjepan Glavina 4df98de5ae
. 2020-11-30 12:30:45 +01:00
Stjepan Glavina 30fcade0e4
Merge pull request #23 from papertigers/illumos-fixes
port_dissociate should be aware of ENOENT
2020-10-20 16:08:39 +02:00
Mike Zeller 6f778cddf1 port_dissociate should be aware of ENOENT 2020-10-19 22:19:12 +00:00
Stjepan Glavina 9c7e8061c5 Bump to v2.0.2 2020-10-19 00:25:40 +02:00
Stjepan Glavina 3a3020bb5c Use as_ptr and as_mut_ptr 2020-10-19 00:24:56 +02:00
Stjepan Glavina f4ee76fb32 Bump to v2.0.1 2020-10-09 14:10:22 +02:00
Stjepan Glavina 421bfc635d Reenable async-io tests 2020-10-03 17:09:03 +02:00
Stjepan Glavina 112da8b4e5 Bump to v2.0.0 2020-10-03 16:35:24 +02:00
Stjepan Glavina 7d1a4e3fe3
Merge pull request #18 from stjepang/fix-sigsegv
Try fixing sigsegv
2020-10-02 19:30:17 +02:00
Stjepan Glavina e8023dcb58 Put back winapi 2020-10-02 19:25:43 +02:00
Stjepan Glavina 5bd5cd226c Update wepoll-sys to 3.0.0 2020-10-02 19:19:18 +02:00
Stjepan Glavina 0bc0553217 Switch to published wepoll-sys 2020-10-02 18:34:49 +02:00
Stjepan Glavina b562ab84ea Use notified flag to make timeouts correct 2020-10-02 18:31:00 +02:00
Stjepan Glavina b25847f0ed Try fixing sigsegv 2020-10-02 18:24:37 +02:00
Stjepan Glavina 89ef82d11d Fix wepoll-sys version 2020-10-02 18:20:55 +02:00
Stjepan Glavina a3c748bcd0 Use more explicit type conversions 2020-10-02 18:19:15 +02:00
Stjepan Glavina 8b656241d5 Use saturating_add to prevent overflow 2020-10-02 18:17:45 +02:00
Stjepan Glavina d4667889b4 Switch to wepoll-sys 2020-10-02 17:41:55 +02:00
Stjepan Glavina 0a299cf060 Small cleanup 2020-10-02 17:34:53 +02:00
Stjepan Glavina 35add590ce
Merge pull request #17 from YorickPeterse/separate-poller-methods
Refactor Poller.add and Poller.interest
2020-10-02 16:32:20 +02:00
Yorick Peterse 29791dec13
Temporarily disable async-io tests
These will fail until a new version of polling is released and async-io
is updated.
2020-10-02 01:32:44 +02:00
Yorick Peterse ba05307af1
Separate adding and modifying of file descriptors
This replaces Poller.insert() and Poller.interest() with Poller.add()
and Poller.modify(), and renames Poller.remove() to Poller.delete().

The method Poller.add() is used for adding a new file descriptor, while
Poller.modify() is used for updating an existing one. Poller.remove() is
renamed to Poller.delete() so the naming scheme of these methods follows
that of epoll, wepoll, etc.

This new setup means that adding a new socket only requires a single
call of Poller.add(), instead of a combination of Poller.insert() and
Poller.interest(). This reduces the amount of system calls necessary,
and leads to a more pleasant API.

On systems that use kqueue or ports, the behaviour of Poller.add() and
Poller.modify() is the same. This is because on these systems adding an
already existing file descriptor will just update its configuration.
This however is an implementation detail and should not be relied upon
by users.

Migrating to this new API is pretty simple, simply replace this:

    poller.insert(&socket);
    poller.interest(&socket, event);

With this:

    poller.add(&socket, event);

And for cases where Poller.interest() was used for updating an existing
file descriptor, simply replace it will a call to Poller.modify().

See https://github.com/stjepang/polling/issues/16 and
https://github.com/stjepang/polling/pull/17 for more information.
2020-10-01 21:50:59 +02:00
Yorick Peterse 4e5c3ce836
Don't automatically make descriptors non-blocking
This adds redundant system call overhead for file descriptors which have
already been turned into non-blocking file descriptors. In addition, the
polling crate doesn't need to implement platform specific code for
enabling non-blocking mode. Instead, users of polling can do so using
(for example) standard library methods such as
TcpListener.set_nonblocking().

See https://github.com/stjepang/polling/issues/16 for more information.
2020-10-01 20:06:07 +02:00
Stjepan Glavina 5309d571b2 Bump to v1.1.0 2020-09-20 17:45:49 +02:00
Stjepan Glavina 272bb11eaf Add feature 2020-09-20 17:45:24 +02:00
Stjepan Glavina 8c7ce8fb5b Bump to v1.0.3 2020-09-16 11:46:25 +02:00
Stjepan Glavina 8a77220000
Merge pull request #15 from JayceFayne/deps
remove `libc` dependency on windows
2020-09-16 11:45:32 +02:00
Jayce Fayne 2ecb5564e8 remove `libc` dependency on windows 2020-09-16 11:23:03 +02:00
Stjepan Glavina 8e35897e53 Bump to v1.0.2 2020-09-15 20:53:33 +02:00