Code Monkey home page Code Monkey logo

gaea's People

Contributors

ahmedcharles avatar aidanhs avatar aleksandrpak avatar alexcrichton avatar asomers avatar carllerche avatar cramertj avatar danielrh avatar dimbleby avatar dpc avatar dtantsur avatar elinorbgr avatar fhartwig avatar frehberg avatar frewsxcv avatar geofft avatar hjr3 avatar hoxnox avatar nagisa avatar oconnor663 avatar reem avatar rom1v avatar rozaliev avatar rrichardson avatar spastorino avatar thijsc avatar thomasdezeeuw avatar vhbit avatar vvanders avatar wycats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gaea's Issues

Write benchmarks

Write benchmarks for the following:

  • Duplicated kqueue file descriptor vs. none-duplicated, see pr #45.
  • Timer space event structure, see issue #2.
  • User space events, see issue #25.

Rename Ready::TIMER to DEADLINE

Currently it still refers to the Timer struct, but that was removed. Now Poller only has add and remove deadline methods, this name should reflect that.

Fix documentation intralinks

When documentation the crate from another I get the following warnings:

warning: `[Capacity::Growable]` cannot be resolved, ignoring it...
   --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/event.rs:208:26
    |
208 |     /// If this returns [`Capacity::Growable`] and the capacity left is
    |                          ^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
    |
    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[Source::blocking_poll]` cannot be resolved, ignoring it...
  --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/event.rs:91:26
   |
91 |     /// [blocking call]: Source::blocking_poll
   |                          ^^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
   |
   = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[Events]` cannot be resolved, ignoring it...
  --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/event.rs:99:33
   |
99 |     /// Some implementation of [`Events`] have a limited available capacity.
   |                                 ^^^^^^^^ cannot be resolved, ignoring
   |
   = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[Events::capacity_left]` cannot be resolved, ignoring it...
   --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/event.rs:100:51
    |
100 |     /// This method may not add more events then [`Events::capacity_left`]
    |                                                   ^^^^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
    |
    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[Source::poll]` cannot be resolved, ignoring it...
   --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/event.rs:109:30
    |
109 |     /// This is the same as [`Source::poll`] and all requirements of that method
    |                              ^^^^^^^^^^^^^^ cannot be resolved, ignoring
    |
    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[crate::os::OsQueue::register]` cannot be resolved, ignoring it...
  --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/os/evented.rs:76:31
   |
76 |     /// [`OsQueue.register`]: crate::os::OsQueue::register
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
   |
   = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[crate::os::OsQueue::reregister]` cannot be resolved, ignoring it...
  --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/os/evented.rs:84:33
   |
84 |     /// [`OsQueue.reregister`]: crate::os::OsQueue::reregister
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
   |
   = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

warning: `[crate::os::OsQueue::deregister]` cannot be resolved, ignoring it...
  --> /Users/thomas/.cargo/git/checkouts/mio-st-36dfa78dd2dc66e1/518d5ec/src/os/evented.rs:92:33
   |
92 |     /// [`OsQueue.deregister`]: crate::os::OsQueue::deregister
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
   |
   = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`

    Finished dev [unoptimized + debuginfo] target(s) in 8.90s

Release v0.2

  • Update changelog.
  • Bump version in Cargo.toml.
  • Create git tab.
  • Publish to crates.io.

Cleanup in tests

  • Add an expect_no_events.
  • Deduplicate expect_events functions in tests.

Also some other various small things after the rewrite.

Drop bitflags

If we drop bitflags and ensure that the interests provided to register and reregister are never we can drop the not_empty check. This also means we can drop PollCalled.

Eventfd should be edge-triggered.

https://github.com/Thomasdezeeuw/mio-st/blob/090c62073c3f8cf3a9fbfd969e02b437e7aa3c2d/src/sys/unix/awakener.rs#L30

I think this may be wrong. It should be edge-triggered instead. Here is why:

https://github.com/Thomasdezeeuw/mio-st/blob/090c62073c3f8cf3a9fbfd969e02b437e7aa3c2d/tests/awakener.rs#L48-L62

If you look at the test above, it seems to be checking that two different events are triggered subsequently. But this is not true. This simply works because the eventfd has been set level-triggered, meaning that each time epoll_wait is called, it will produce an event that data is available, because of the fact that we are not reading from the eventfd at-all!

This observation can be reproduced by simply commenting-out the lines 51-54. You will see that the test passes, because you are actually testing some other semantics and not the actual one here.

Solution: The eventfd should be registered edge-triggered.

Expand TcpStream and UdpSocket options

From the manual for setsockopt:

SO_KEEPALIVE    enables keep connections alive
SO_LINGER       linger on close if data present
SO_OOBINLINE    enables reception of out-of-band data in band
SO_SNDBUF       set buffer size for output
SO_RCVBUF       set buffer size for input
SO_SNDLOWAT     set minimum count for output
SO_RCVLOWAT     set minimum count for input
SO_SNDTIMEO     set timeout value for output
SO_RCVTIMEO     set timeout value for input

Check io flags

Currently use after fork is somewhat vague. For exampe kqueue won't work after fork, but epoll might. We need to make it consistent.

Fix the need for generic parameters in calls to poll

Currently poll has two generic parameters of which the error is almost never inferred, e.g. from the example of the crate docs.

poll::<_, io::Error>(&mut [&mut os_queue], &mut events, None)?;
//    ^^^^^^^^^^^^^^ Don't like this.

Enable testing on macOS on Travis

Currently the tests for the deadline module fail:

  • deadline::multiple_deadline_same_id
  • deadline::multiple_timers
  • deadline::poll_should_set_timeout

All with roughly the same error; the time ran too long.

Rename `Events`

Since the change to a trait Events might not be the best name. Something like event::Sink might be better.

Build for more OSes on CI

Even though we can't run the tests for more OSes on Travis we can at least build those targets. Locally I use the following script.

cargo build --target x86_64-apple-darwin
cargo build --target x86_64-unknown-freebsd
# Doesn't have EVFILT_USER, used in Awakener.
#cargo build --target x86_64-unknown-netbsd
cargo build --target x86_64-unknown-linux-gnu
cargo build --target x86_64-unknown-linux-musl

Tests for IPv6

For TcpListener, TcpStream, UdpSocket and ConnectedUdpSocket. [::1] should do the trick, but I'm not sure if Travis supports ipv6.

Review unsafe code

Some of the use of unsafe code is incorrect I think. For example the use of mem::uninitialized should be replaced with mem::MaybeUninit (currently unstable).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.