|
18 | 18 | //! wake appropriate futures blocked on I/O or timers when they can be resumed.
|
19 | 19 | //!
|
20 | 20 | //! To wait for the next I/O event, the "async-io" thread uses [epoll] on Linux/Android/illumos,
|
21 |
| -//! [kqueue] on macOS/iOS/BSD, and [wepoll] on Windows. |
| 21 | +//! [kqueue] on macOS/iOS/BSD, [event ports] on illumos/Solaris, and [wepoll] on Windows. |
22 | 22 | //!
|
23 | 23 | //! However, note that you can also process I/O events and wake futures manually if using the
|
24 | 24 | //! [`parking`] module. The "async-io" thread is therefore just a fallback mechanism processing I/O
|
|
28 | 28 | //!
|
29 | 29 | //! [epoll]: https://en.wikipedia.org/wiki/Epoll
|
30 | 30 | //! [kqueue]: https://en.wikipedia.org/wiki/Kqueue
|
| 31 | +//! [event ports]: https://illumos.org/man/port_create |
31 | 32 | //! [wepoll]: https://github.com/piscisaureus/wepoll
|
32 | 33 | //!
|
33 | 34 | //! # Examples
|
@@ -210,14 +211,15 @@ impl Future for Timer {
|
210 | 211 | /// Async I/O.
|
211 | 212 | ///
|
212 | 213 | /// This type converts a blocking I/O type into an async type, provided it is supported by
|
213 |
| -/// [epoll]/[kqueue]/[wepoll]. |
| 214 | +/// [epoll]/[kqueue]/[event ports]/[wepoll]. |
214 | 215 | ///
|
215 | 216 | /// **NOTE:** Do not use this type with [`File`][`std::fs::File`], [`Stdin`][`std::io::Stdin`],
|
216 | 217 | /// [`Stdout`][`std::io::Stdout`], or [`Stderr`][`std::io::Stderr`] because they're not
|
217 | 218 | /// supported.
|
218 | 219 | ///
|
219 | 220 | /// [epoll]: https://en.wikipedia.org/wiki/Epoll
|
220 | 221 | /// [kqueue]: https://en.wikipedia.org/wiki/Kqueue
|
| 222 | +/// [event ports]: https://illumos.org/man/port_create |
221 | 223 | /// [wepoll]: https://github.com/piscisaureus/wepoll
|
222 | 224 | ///
|
223 | 225 | /// # Examples
|
@@ -268,13 +270,14 @@ impl<T: AsRawFd> Async<T> {
|
268 | 270 | /// Creates an async I/O handle.
|
269 | 271 | ///
|
270 | 272 | /// This function will put the handle in non-blocking mode and register it in
|
271 |
| - /// [epoll]/[kqueue]/[wepoll]. |
| 273 | + /// [epoll]/[kqueue]/[event ports]/[wepoll]. |
272 | 274 | ///
|
273 | 275 | /// On Unix systems, the handle must implement `AsRawFd`, while on Windows it must implement
|
274 | 276 | /// `AsRawSocket`.
|
275 | 277 | ///
|
276 | 278 | /// [epoll]: https://en.wikipedia.org/wiki/Epoll
|
277 | 279 | /// [kqueue]: https://en.wikipedia.org/wiki/Kqueue
|
| 280 | + /// [event ports]: https://illumos.org/man/port_create |
278 | 281 | /// [wepoll]: https://github.com/piscisaureus/wepoll
|
279 | 282 | ///
|
280 | 283 | /// # Examples
|
@@ -308,13 +311,14 @@ impl<T: AsRawSocket> Async<T> {
|
308 | 311 | /// Creates an async I/O handle.
|
309 | 312 | ///
|
310 | 313 | /// This function will put the handle in non-blocking mode and register it in
|
311 |
| - /// [epoll]/[kqueue]/[wepoll]. |
| 314 | + /// [epoll]/[kqueue]/[event ports]/[wepoll]. |
312 | 315 | ///
|
313 | 316 | /// On Unix systems, the handle must implement `AsRawFd`, while on Windows it must implement
|
314 | 317 | /// `AsRawSocket`.
|
315 | 318 | ///
|
316 | 319 | /// [epoll]: https://en.wikipedia.org/wiki/Epoll
|
317 | 320 | /// [kqueue]: https://en.wikipedia.org/wiki/Kqueue
|
| 321 | + /// [event ports]: https://illumos.org/man/port_create |
318 | 322 | /// [wepoll]: https://github.com/piscisaureus/wepoll
|
319 | 323 | ///
|
320 | 324 | /// # Examples
|
@@ -1314,7 +1318,7 @@ async fn optimistic(fut: impl Future<Output = io::Result<()>>) -> io::Result<()>
|
1314 | 1318 | /// Shuts down the write side of a socket.
|
1315 | 1319 | ///
|
1316 | 1320 | /// If this source is not a socket, the `shutdown()` syscall error is ignored.
|
1317 |
| -pub fn shutdown_write(#[cfg(unix)] raw: RawFd, #[cfg(windows)] raw: RawSocket) -> io::Result<()> { |
| 1321 | +fn shutdown_write(#[cfg(unix)] raw: RawFd, #[cfg(windows)] raw: RawSocket) -> io::Result<()> { |
1318 | 1322 | // This may not be a TCP stream, but that's okay. All we do is attempt a `shutdown()` on the
|
1319 | 1323 | // raw descriptor and ignore errors.
|
1320 | 1324 | let stream = unsafe {
|
|
0 commit comments