Commit Graph

265 Commits

Author SHA1 Message Date
Stjepan Glavina 12fe6b5938 Fix a scheduling fairness issue 2020-06-20 16:29:04 +02:00
Stjepan Glavina f40acf640c Fix lost wakeups in the executor 2020-06-20 15:54:22 +02:00
Stjepan Glavina ab9c9d9e4e Fix compilation error 2020-06-19 17:06:33 +02:00
Stjepan Glavina b5cc4c433d Fix lost reader wakeups 2020-06-19 17:03:33 +02:00
Stjepan Glavina 45bb5ed3c7 Simplify blocking 2020-06-18 18:50:42 +02:00
Stjepan Glavina d559855775 Simplify 2020-06-18 18:24:26 +02:00
Stjepan Glavina 6ada2d13cf Clear the IoEvent after any react() call 2020-06-18 16:39:21 +02:00
Stjepan Glavina fbb0fb637a Address clippy complaints 2020-06-18 16:27:17 +02:00
Stjepan Glavina ebc1f4fb34 Merge branch 'master' into refactor 2020-06-18 16:10:54 +02:00
Stjepan Glavina 98ed9fb731
Merge pull request #162 from sopium/reregister-the-other-event
Reregister if we get only readable or writable
2020-06-18 16:07:45 +02:00
Stjepan Glavina 01dd5dccc9 Refactor the executor 2020-06-18 16:03:26 +02:00
Stjepan Glavina 3e78e59f52 saved 2020-06-14 14:49:27 +02:00
Yin Guanhao 0e6345dd63 Fix Async::<UdpSocket>::recv 2020-06-13 07:28:40 +02:00
Yin Guanhao e8d0febbc3 Reregister if we get only readable or writable
but we are interested in both. Fix #161.
2020-06-07 12:00:28 +02:00
Stjepan Glavina 0408c19531 work 2020-06-05 14:23:05 +02:00
Stjepan Glavina e6bd9229f7 Update concurrent-queue 2020-06-02 16:49:49 +02:00
Stjepan Glavina 2253923ec8 Replace some crates 2020-06-02 15:47:38 +02:00
Stjepan Glavina 90aa585cfa Cleanup 2020-06-01 10:03:39 +02:00
Stjepan Glavina c5a270133b Cross compilation and testing 2020-05-31 22:41:56 +02:00
dignifiedquire 1ba84935e4 fix: support systems without epoll_create1 2020-05-28 15:40:39 +02:00
dignifiedquire 47f047c052 fix compiles for winodws 2020-05-28 15:40:39 +02:00
dignifiedquire a56aa12de8 refactor: use libc for epoll 2020-05-28 15:40:39 +02:00
dignifiedquire 63ffbc575c refactor: use libc for kqueue 2020-05-28 15:40:39 +02:00
dignifiedquire f647532400 refactor: use libc for eventfd 2020-05-28 15:40:39 +02:00
dignifiedquire b500e5ce2b refactor: use libc for unistd 2020-05-28 15:40:39 +02:00
dignifiedquire b3358ef275 refactor: use libc instead of nix for fcntl 2020-05-28 15:40:39 +02:00
dignifiedquire 49f3eb56c1 flatten 2020-05-28 15:40:39 +02:00
dignifiedquire 1743bc4d32 refactor: isolate nix crate to a single file 2020-05-28 15:40:39 +02:00
Stjepan Glavina b1b5986ef7
Merge pull request #143 from stjepang/unlock-before-wake
Drop locks before waking tasks
2020-05-28 06:32:09 -07:00
dignifiedquire 3e16c34504 feat: allow recursive block_on calls 2020-05-27 16:18:12 +02:00
Stjepan Glavina a37c1ee8ea Drop locks before waking tasks 2020-05-25 23:31:11 +02:00
Matt Brubeck 1ba194cb86 Depend on individual crossbeam crates.
This shrinks the dependency graph slightly, as it no longer pulls in the
unused crossbeam-channel crate.
2020-05-24 10:40:00 -07:00
Stjepan Glavina cee8acd7e5 Update wepoll-binding to 2.0.2 2020-05-23 18:12:17 +02:00
Stjepan Glavina c7bc1bed0f Also use take_error after writing 2020-05-22 20:29:50 +02:00
Stjepan Glavina 7ac8969f45 Call take_error inside the wait_connect loop 2020-05-22 20:22:41 +02:00
Stjepan Glavina f245693472 Use take_error after connecting 2020-05-22 20:12:54 +02:00
Stjepan Glavina d7b06dd6b0 Clear local event when triggered 2020-05-22 14:08:53 +02:00
Stjepan Glavina 56e459e966 Fix a compilation error 2020-05-22 13:49:27 +02:00
Stjepan Glavina b62db64e6a Fix a compilation error 2020-05-22 13:49:04 +02:00
Stjepan Glavina da002315ed Fix a bug in kqueue bindings 2020-05-22 13:48:15 +02:00
Stjepan Glavina f1a22d9cc2 Remove readable and writable 2020-05-22 13:17:08 +02:00
Stjepan Glavina 26a3208342 Fix errors 2020-05-21 23:47:17 +02:00
Stjepan Glavina 6d4bffa124 Fix a compilation error in a doctest 2020-05-21 20:11:47 +02:00
Stjepan Glavina c5e57ee346 Check for errors after connecting 2020-05-21 20:06:31 +02:00
Stjepan Glavina 76aa1ea654 Split with() into read_with() and write_with() 2020-05-21 19:17:33 +02:00
Alexander Polakov efcb9e7e40 fix: add Drop for eventfd 2020-05-20 20:21:33 +03:00
Stjepan Glavina 811e748e6d Revert the use of blocking crate 2020-05-18 11:32:41 +02:00
Stjepan Glavina ce315f3d9a Update blocking 2020-05-17 23:55:23 +02:00
Stjepan Glavina 3674e8996f
Merge pull request #118 from Byron/explicit-futures-dependencies
Refer to futures sub-crates explicitly
2020-05-17 04:17:52 -07:00
Sebastian Thiel 8d0cd19ce9
Refer to futures sub-crates explicitly 2020-05-17 18:30:25 +08:00
Stjepan Glavina e46e410d86 Always re-register IoEvent 2020-05-17 10:58:06 +02:00
Stjepan Glavina 21e65af190 Fix a missing line in docs 2020-05-17 10:00:39 +02:00
Yin Guanhao f267ab1152 Correctly detect TCP connection failures on Windows 2020-05-15 10:13:47 +08:00
Stjepan Glavina 807456699a Fix broken doc links 2020-05-14 20:32:12 +02:00
Stjepan Glavina 2ff45ece44 Fix re-registration 2020-05-14 20:25:33 +02:00
Stjepan Glavina ee6a0bce4d rename an argument 2020-05-14 20:00:33 +02:00
Jagadesh Adireddi 19a1a11583 change to modify socket with notifier. 2020-05-12 18:58:01 +05:30
Stjepan Glavina 2071f2a481
Merge pull request #106 from stjepang/blocking
Replace the blocking executor with blocking crate
2020-05-12 00:32:01 -07:00
Alexander Polakov 9ec3067ba2 fix: high cpu usage for timer 2020-05-12 00:00:23 +03:00
Stjepan Glavina 77494aaa2d Replace the blocking executor with blocking crate 2020-05-11 12:29:43 +02:00
Stjepan Glavina bc3293203f
Merge pull request #92 from joshtriplett/use-duration
Use Duration functions rather than computing seconds/nanoseconds by hand
2020-05-08 13:31:17 -07:00
Josh Triplett 7c15dba27c Use Duration functions rather than computing seconds/nanoseconds by hand
Duration already provides functions to get the whole seconds and the
subseconds in various units, so use those directly.
2020-05-08 12:47:45 -07:00
Stjepan Glavina f340dce8ca
Merge pull request #86 from polachok/eventfd
Use eventfd for IoEvent on linux
2020-05-08 11:11:18 -07:00
Stjepan Glavina d1d0ace184 Minor cleanup 2020-05-07 16:36:48 +02:00
Stjepan Glavina ef701a4128 Check for EINPROGRESS in UnixStream::connect 2020-05-07 16:36:10 +02:00
Stjepan Glavina 34fcc57a7f Format comments 2020-05-07 16:33:44 +02:00
Jagadesh Adireddi 8a6b4b89b0 handling connection in progress check separately for both unix and windows os. 2020-05-07 14:11:33 +05:30
Jagadesh Adireddi 8671dbb4d5 Refactor libc dependency. 2020-05-07 12:35:55 +05:30
Jagadesh Adireddi f3de5b91aa Add libc to dependency. 2020-05-07 11:34:13 +05:30
Jagadesh Adireddi 1547d075de Change to enhance tcp socket conn error message. 2020-05-06 21:21:36 +05:30
Alexander Polakov d910299003 Use eventfd for IoEvent on linux 2020-05-05 01:46:53 +03:00
Stjepan Glavina b1ce21307f Use microsecond precision with kqueue 2020-05-03 17:28:09 +02:00
Stjepan Glavina 74b8276e99
Merge pull request #70 from stjepang/explain-threaded-executors
Explain single vs multi-threaded executors
2020-05-02 12:35:13 -07:00
Stjepan Glavina 3e2d0d5c31 Reword the comment a bit 2020-05-02 21:33:27 +02:00
Stjepan Glavina c736faacd3 Elaborate on block_on 2020-05-02 20:44:56 +02:00
Stjepan Glavina e61515a6f8 Fix a broken link 2020-04-30 21:49:17 +02:00
Stjepan Glavina 578d85b1b9 Explain single vs multi-threaded executors 2020-04-30 21:46:15 +02:00
Stjepan Glavina 5c44e642bf
Merge pull request #67 from hwchen/doc/scheduling
add some docs on scheduling
2020-04-30 12:38:47 -07:00
Dmitry Kashitsyn 198cb11d89
Adds missing code delimiter 2020-04-30 22:57:02 +07:00
Walther Chen 26baeef1f4 add some docs on scheduling 2020-04-29 22:03:33 -04:00
Marli Frost 37edb1c167
Use a better representation for some errors 2020-04-28 17:19:10 +01:00
Stjepan Glavina 3b867877e9 Fix a bug in UDS connect 2020-04-28 16:08:16 +02:00
Stjepan Glavina 8345093ad5 Fix the writability check in async connect 2020-04-28 15:27:06 +02:00
Sebastian Thiel ae35e54b9a
Use 'num_threads' variable in doc-exapmple for `smol::run` 2020-04-28 08:50:52 +08:00
Stjepan Glavina 2ff9e2cbf3 Less dependencies 2020-04-27 18:57:16 +02:00
Stjepan Glavina 6341f5872f Reword some comments 2020-04-27 16:02:56 +02:00
Stjepan Glavina fce8487385 Retry on EINTR 2020-04-27 15:10:29 +02:00
Stjepan Glavina 530f43203d Fix a typo 2020-04-27 14:23:18 +02:00
dignifiedquire cc562d97c5 fix imports 2020-04-26 21:26:07 +02:00
dignifiedquire 958efe0a8c feat(async_io): support vectored methods 2020-04-26 21:05:05 +02:00
Stjepan Glavina 3e899311b0 More docs and comments 2020-04-26 19:38:08 +02:00
Stjepan Glavina 6a02cbb054 More docs 2020-04-25 23:19:52 +02:00
Leo Le Bouter b1c738b412
Fix IntowRawSocket -> IntoRawSocket typo 2020-04-25 21:40:55 +02:00
Stjepan Glavina eef5d79f48
Merge pull request #25 from dignifiedquire/ideas-and-helpers
Ideas and helpers
2020-04-25 10:03:47 -07:00
dignifiedquire 9b44f7f839 remove unused import 2020-04-25 19:02:10 +02:00
Friedel Ziegelmayer 0d6ea14e5c
remove unneeded FromRawFd
Co-Authored-By: Stjepan Glavina <stjepang@gmail.com>
2020-04-25 19:01:24 +02:00
dignifiedquire 258147d15c undo detach change, implment Into<JoinHandle> for Task 2020-04-25 18:44:22 +02:00
Stjepan Glavina 55f360bdd7 Fix a bug in timers 2020-04-25 17:45:45 +02:00
dignifiedquire b81bc1c2af fix into_raw and add from_raw 2020-04-25 16:50:09 +02:00
dignifiedquire c94f74249c task: return JoinHandle from detach 2020-04-25 16:50:09 +02:00