mirror of https://github.com/smol-rs/polling
Merge branch 'master'
This commit is contained in:
commit
a04a265f9b
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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)](
|
||||
|
|
|
@ -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()?;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue