Merge branch 'master'

This commit is contained in:
Koxiaet 2021-01-03 10:19:51 +00:00
commit a04a265f9b
8 changed files with 15 additions and 17 deletions

View File

@ -55,7 +55,7 @@ jobs:
command: test
- name: Clone async-io
run: git clone https://github.com/stjepang/async-io.git
run: git clone https://github.com/smol-rs/async-io.git
- name: Add patch section
run: echo '[patch.crates-io]' >> async-io/Cargo.toml
- name: Patch polling

View File

@ -23,10 +23,6 @@ jobs:
toolchain: nightly
override: true
- name: Install docker
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt install docker
- name: Install cross
run: cargo install cross

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -5,8 +5,8 @@ authors = ["Stjepan Glavina <stjepang@gmail.com>"]
edition = "2018"
description = "Portable interface to epoll, kqueue, event ports, and wepoll"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/stjepang/polling"
homepage = "https://github.com/stjepang/polling"
repository = "https://github.com/smol-rs/polling"
homepage = "https://github.com/smol-rs/polling"
documentation = "https://docs.rs/polling"
keywords = ["mio", "epoll", "kqueue", "iocp", "wepoll"]
categories = ["asynchronous", "network-programming", "os"]
@ -17,7 +17,7 @@ default = ["std"]
std = []
[dependencies]
cfg-if = "0.1.10"
cfg-if = "1"
log = "0.4.11"
[target."cfg(unix)".dependencies]

View File

@ -1,9 +1,9 @@
# polling
[![Build](https://github.com/stjepang/polling/workflows/Build%20and%20test/badge.svg)](
https://github.com/stjepang/polling/actions)
[![Build](https://github.com/smol-rs/polling/workflows/Build%20and%20test/badge.svg)](
https://github.com/smol-rs/polling/actions)
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](
https://github.com/stjepang/polling)
https://github.com/smol-rs/polling)
[![Cargo](https://img.shields.io/crates/v/polling.svg)](
https://crates.io/crates/polling)
[![Documentation](https://docs.rs/polling/badge.svg)](

View File

@ -429,9 +429,10 @@ impl Poller {
/// ```
pub fn notify(&self) -> io::Result<()> {
log::trace!("Poller::notify()");
if !self
if self
.notified
.compare_and_swap(false, true, Ordering::SeqCst)
.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst)
.is_ok()
{
self.poller.notify()?;
}

View File

@ -115,9 +115,10 @@ impl Poller {
pub fn notify(&self) -> io::Result<()> {
log::trace!("notify: handle={:?}", self.handle);
if !self
if self
.notified
.compare_and_swap(false, true, Ordering::SeqCst)
.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst)
.is_ok()
{
unsafe {
// This call errors if a notification has already been posted, but that's okay - we