commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
0d306a5efc95da2f2eee705792e07c1813c82b12
MSxDOS
2025-12-20T00:48:40
Release 0.4.2
diff --git a/Cargo.toml b/Cargo.toml index cc34a4b..54c028a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.4.1" +version = "0.4.2" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
3eacc83f0bf18c3c5d4851ca354877b2b71e3df8
MSxDOS
2025-12-19T23:32:24
Fix https://github.com/MSxDOS/ntapi/issues/21
diff --git a/src/ntpsapi.rs b/src/ntpsapi.rs index 2a0d3cd..320ec0e 100644 --- a/src/ntpsapi.rs +++ b/src/ntpsapi.rs @@ -1154,7 +1154,7 @@ pub const PS_ATTRIBUTE_GROUP_AFFINITY: ULONG_PTR = 0x0003000c; pub const PS_ATTRIBUTE_PREFERRED_NODE: ULONG_PTR = 0x0002000d; pub const PS_ATTRIBUTE_IDEAL_PROCESSOR: ULONG_PTR = 0...
1
1
1
f93504e6b71f2ba6355e0fbc0a703da5656fb3bf
MSxDOS
2023-04-20T23:00:37
Release 0.4.1
diff --git a/Cargo.toml b/Cargo.toml index d6e88ce..cc34a4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.4.0" +version = "0.4.1" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
c22e0de3f4528a988bda223234f400fb190a92c1
MSxDOS
2023-04-20T22:58:47
Fix warnings
diff --git a/src/ntexapi.rs b/src/ntexapi.rs index 08a0ddf..7bc73a0 100644 --- a/src/ntexapi.rs +++ b/src/ntexapi.rs @@ -2780,7 +2780,7 @@ pub type PKUSER_SHARED_DATA = *mut KUSER_SHARED_DATA; pub const USER_SHARED_DATA: *const KUSER_SHARED_DATA = 0x7ffe0000 as *const _; #[inline] pub unsafe fn NtGetTickCount64() ->...
1
2
2
00da88451fa366656e46a0edf8738d9ba4f0a044
MSxDOS
2023-04-20T22:33:33
Update FIELD_OFFSET macro
diff --git a/src/macros.rs b/src/macros.rs index 530aeaf..19ecc4d 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -27,12 +27,11 @@ macro_rules! EXTERN { #[macro_export] #[doc(hidden)] macro_rules! FIELD_OFFSET { - ($_type:ty, $field:ident$(.$cfields:ident)*) => { - unsafe { - let base = ::core...
1
5
6
e71470c7fce42f79478479ae869b49e261d50f12
vd4re
2023-04-20T22:19:59
Update FIELD_OFFSET macro (#16)
diff --git a/src/macros.rs b/src/macros.rs index 92cdd96..530aeaf 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -29,17 +29,8 @@ macro_rules! EXTERN { macro_rules! FIELD_OFFSET { ($_type:ty, $field:ident$(.$cfields:ident)*) => { unsafe { - union Transmuter<T: 'static> { - p: ...
1
2
11
a09a60cbccf4ad3d05d80d076ecf5e375a5826b4
MSxDOS
2022-09-23T21:47:50
Release 0.4
diff --git a/Cargo.toml b/Cargo.toml index d63ff19..d6e88ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.3.7" +version = "0.4.0" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
9f56b149c9e25796739157c0fce3e0007a7de6eb
MSxDOS
2022-09-23T21:02:09
Remove unneeded const fn workarounds
diff --git a/src/ntldr.rs b/src/ntldr.rs index 1114dd8..4b4bcb6 100644 --- a/src/ntldr.rs +++ b/src/ntldr.rs @@ -201,7 +201,7 @@ pub const fn LDR_IS_IMAGEMAPPING(DllHandle: ULONG_PTR) -> bool { } #[inline] pub const fn LDR_IS_RESOURCE(DllHandle: ULONG_PTR) -> bool { - (LDR_IS_IMAGEMAPPING(DllHandle) | LDR_IS_DATA...
3
15
7
b0936c3c7dfc6d10de8cce194c36ab62630a8812
MSxDOS
2022-09-23T20:45:25
Get rid of deprecated stuff
diff --git a/src/ntexapi.rs b/src/ntexapi.rs index d48749d..08a0ddf 100644 --- a/src/ntexapi.rs +++ b/src/ntexapi.rs @@ -1,9 +1,9 @@ -use core::mem::uninitialized; +use core::mem::MaybeUninit; #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] use core::ptr::addr_of; use core::ptr::read_volatile; #[cfg(ta...
1
6
6
8e551443caa56adf56046367bdaf38c525ec6a08
MSxDOS
2022-02-02T15:18:40
Fix errors introduced by #8 and other warnings
diff --git a/Cargo.toml b/Cargo.toml index 6bee891..c4777e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,4 +28,4 @@ impl-default = ["winapi/impl-default"] user = [] kernel = [] beta = [] -nightly = ["beta"] \ No newline at end of file +nightly = ["beta"] diff --git a/src/lib.rs b/src/lib.rs index 30c5458..6b06b6c...
5
19
12
cbea31ea9d624169f01ae0997e6698baceb51867
MSxDOS
2020-10-23T14:08:17
Release 0.3.6
diff --git a/Cargo.toml b/Cargo.toml index 95c95a2..7f6213c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.3.5" +version = "0.3.6" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
87784d8f67dfcbb2616cf69557d373d0ad41a057
MSxDOS
2020-10-23T13:58:22
Use volatile reads in NtGetTickCount*
diff --git a/src/ntexapi.rs b/src/ntexapi.rs index a478f0c..7d34220 100644 --- a/src/ntexapi.rs +++ b/src/ntexapi.rs @@ -1,5 +1,6 @@ #[allow(deprecated)] //fixme use core::mem::uninitialized; +use core::ptr::read_volatile; #[cfg(target_arch = "x86")] use core::sync::atomic::spin_loop_hint; use crate::ntapi_base::{...
1
16
9
e26f3b086291a5aae3b45701cba487794b1ed187
MSxDOS
2020-10-23T10:47:44
Release 0.3.5
diff --git a/Cargo.toml b/Cargo.toml index a9420af..95c95a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.3.4" +version = "0.3.5" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
565287fe3cf90b85993d7c6cddd05a648103092d
MSxDOS
2020-10-23T10:47:03
Fix formatting
diff --git a/src/ntrtl.rs b/src/ntrtl.rs index 9ef6cbc..afbbb16 100644 --- a/src/ntrtl.rs +++ b/src/ntrtl.rs @@ -2948,7 +2948,11 @@ pub unsafe fn RtlCheckBit(BitMapHeader: &RTL_BITMAP, BitPosition: ULONG) -> u8 { use crate::winapi_local::um::winnt::_bittest64; _bittest64(BitMapHeader.Buffer as *const ...
1
5
1
433abdb8ec4afcb9c8e63371c017a3dfbf8b1b15
MSxDOS
2020-10-23T10:06:13
Update metadata for docs.rs and remove badges
diff --git a/Cargo.toml b/Cargo.toml index 1cd18d1..a9420af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,16 +14,13 @@ edition = "2018" [package.metadata.docs.rs] default-target = "x86_64-pc-windows-msvc" -features = ["func-types", "nightly"] +features = ["nightly"] +targets = ["aarch64-pc-windows-msvc", "i686-pc...
1
2
5
ae55cad0b0ad67533fb40378607144fc09c9f161
Mateusz Mikuła
2020-08-13T20:44:56
Allow linking to system ntdll (#4) * Allow linking to system ntdll * Use imported `var`
diff --git a/build.rs b/build.rs index ecc3726..bbd46f5 100644 --- a/build.rs +++ b/build.rs @@ -1,9 +1,15 @@ +use std::env::var; + fn main() { #[cfg(feature = "user")] { - if std::env::var("TARGET").map( + if var("TARGET").map( |t| t == "x86_64-pc-windows-gnu" || t == "i686-pc-windows-...
1
8
2
9856cbbae29ebca6a3e4a02f6f62badd1ed54ba0
MSxDOS
2020-05-09T10:48:01
Release 0.3.4
diff --git a/Cargo.toml b/Cargo.toml index ddecd9c..e26d5ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.3.3" +version = "0.3.4" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
7b57f02a7f33e3bca82c5203158dcbcad9d0b9ed
MSxDOS
2020-05-08T14:19:09
Hide this re-export from docs
diff --git a/src/lib.rs b/src/lib.rs index 2fee711..5d4e33f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,6 +34,7 @@ #[doc(hidden)] pub extern crate core as _core; #[macro_use] +#[doc(hidden)] pub extern crate winapi; #[macro_use] mod macros;
1
1
0
9db59df4531989343935669d8c58b35382e40817
MSxDOS
2020-05-08T14:16:10
Fix and suppress the warnings
diff --git a/src/lib.rs b/src/lib.rs index fd6ad9b..2fee711 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,7 +30,7 @@ #![deny(unused, unused_qualifications)] #![warn(unused_attributes)] #![allow(bad_style, overflowing_literals, unused_macros, clippy::cast_lossless, clippy::cast_ptr_alignment, clippy::len_without_is...
3
7
4
090832a38d66c0c905ad0a8c75dc362e14d9cc46
MSxDOS
2019-07-17T17:22:38
Release 0.3.3
diff --git a/Cargo.toml b/Cargo.toml index 2165c71..ddecd9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.3.2" +version = "0.3.3" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
9a4ae4b5750fc14e9d89610ae358198686003f64
MSxDOS
2019-07-17T17:06:21
Fix FIELD_OFFSET
diff --git a/src/macros.rs b/src/macros.rs index ace5f94..3763a84 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -34,7 +34,7 @@ macro_rules! FIELD_OFFSET { i: usize, } Transmuter { - r: &(Transmuter { + r: &(&Transmuter { p...
1
1
1
4f8d9d402c8f947aee634edf5fbc5f38632b6305
MSxDOS
2019-07-16T18:34:31
Release 0.3.2
diff --git a/Cargo.toml b/Cargo.toml index 19a7e13..2165c71 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.3.1" +version = "0.3.2" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
717c102f55136653c585a45d6d47fae9a62b2312
MSxDOS
2019-07-16T18:09:33
Update FIELD_OFFSET It may now be used in constants e.g. for static assertions (but not inside constant functions, yet, see https://github.com/rust-lang/rust/issues/51909)
diff --git a/src/macros.rs b/src/macros.rs index 1dff0c2..ace5f94 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -28,7 +28,16 @@ macro_rules! EXTERN { macro_rules! FIELD_OFFSET { ($_type:ty, $field:ident$(.$cfields:ident)*) => { unsafe { - &(*$crate::_core::ptr::null::<$_type>()).$field$(.$...
1
10
1
c384a16b2e1ab35e634fe10d1bccea123da2b451
MSxDOS
2019-07-16T16:26:16
Use a proper type here
diff --git a/src/ntexapi.rs b/src/ntexapi.rs index 508d2a1..d57b17f 100644 --- a/src/ntexapi.rs +++ b/src/ntexapi.rs @@ -3,7 +3,7 @@ use core::mem::uninitialized; use core::sync::atomic::spin_loop_hint; use crate::ntapi_base::{CLIENT_ID, KPRIORITY, KSYSTEM_TIME, PRTL_ATOM, RTL_ATOM}; use crate::ntioapi::{BUS_DATA_TY...
1
2
2
8a916ea17e8646a09f363883d33c786a7aeb3a9e
MSxDOS
2019-07-16T16:19:44
Fix UTF16Const::as_ref Don't include the terminating null
diff --git a/src/string.rs b/src/string.rs index 3e06981..32bfa50 100644 --- a/src/string.rs +++ b/src/string.rs @@ -17,7 +17,7 @@ impl UTF16Const { impl AsRef<[u16]> for UTF16Const { #[inline] fn as_ref(&self) -> &[u16] { - self.0 + &self.0[..self.len()] } } impl Copy for UTF16Const {}
1
1
1
8b9de286e74e7c23c2e7cba3b448aba948ec47bf
MSxDOS
2019-04-27T15:40:40
Bump version
diff --git a/Cargo.toml b/Cargo.toml index e2a2a31..19a7e13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.3.0" +version = "0.3.1" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
a5076691d18e457357e4eec78ba5531b83742642
MSxDOS
2019-04-27T14:23:54
Some additions and fixes
diff --git a/src/ntpsapi.rs b/src/ntpsapi.rs index c71757d..16ad439 100644 --- a/src/ntpsapi.rs +++ b/src/ntpsapi.rs @@ -859,9 +859,12 @@ STRUCT!{struct THREAD_UMS_INFORMATION { CompletionList: PRTL_UMS_COMPLETION_LIST, UmsContext: PRTL_UMS_CONTEXT, Flags: ULONG, - IsUmsSchedulerThread: ULONG, - Is...
4
21
8
9719e21d69a07e5245031d5f71a63ade73af681e
MSxDOS
2019-03-02T17:29:09
Bump version
diff --git a/Cargo.toml b/Cargo.toml index 4087e80..e2a2a31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.2.0" +version = "0.3.0" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
1303f4f49dbfca7b07eb644ed7a60150df891877
MSxDOS
2019-03-01T19:44:48
Add new bindings
diff --git a/src/ntexapi.rs b/src/ntexapi.rs index ff2bf65..508d2a1 100644 --- a/src/ntexapi.rs +++ b/src/ntexapi.rs @@ -933,7 +933,11 @@ ENUM!{enum SYSTEM_INFORMATION_CLASS { SystemSpeculationControlInformation = 201, SystemDmaGuardPolicyInformation = 202, SystemEnclaveLaunchControlInformation = 203, - ...
10
257
32
c61f6f0ede09bdf671de1c3f1472da8d7fc43d38
MSxDOS
2019-01-07T18:46:01
Fix unused imports
diff --git a/src/ntrtl.rs b/src/ntrtl.rs index e5ea0af..72057fb 100644 --- a/src/ntrtl.rs +++ b/src/ntrtl.rs @@ -16,14 +16,14 @@ use winapi::shared::in6addr::in6_addr; use winapi::shared::inaddr::in_addr; use winapi::shared::minwindef::{BOOL, DWORD, PBOOL}; #[cfg(target_arch = "x86_64")] -use winapi::shared::ntdef::...
1
7
7
925c335b7a4c05e71885e2b1fd2468802bae9d23
MSxDOS
2019-01-07T18:45:12
Embrace #[repr(packed(N))]
diff --git a/src/ntexapi.rs b/src/ntexapi.rs index f35c880..ff2bf65 100644 --- a/src/ntexapi.rs +++ b/src/ntexapi.rs @@ -2653,7 +2653,7 @@ UNION!{union KUSER_SHARED_DATA_u { TickCountQuad: ULONG64, ReservedTickCountOverlay: [ULONG; 3], }} -STRUCT!{struct KUSER_SHARED_DATA { +STRUCT!{#[repr(packed(4))] struct...
4
15
16
b591f7e748572127bac1455b37b9d1b662c6f331
MSxDOS
2019-01-07T14:52:01
Remove copyright headers
diff --git a/src/lib.rs b/src/lib.rs index a33cc89..fd6ad9b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,3 @@ -// Copyright 2018 ntapi Developers -// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or -// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or -// http://openso...
35
0
175
663fe9d1e3e4b148202c7068e5cdc1f709658bda
MSxDOS
2019-01-07T14:40:57
Use const fn wherever possible, update macros
diff --git a/src/macros.rs b/src/macros.rs index d054e8f..10d0249 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -6,18 +6,18 @@ #[macro_export] macro_rules! EXTERN { (extern $c:tt {$( - fn $n:ident ($( $p:tt $(: $t:ty)*),* $(,)*) $(-> $r:ty)*; + fn $n:ident ($( $p:tt $(: $t:ty)?),* $(,)?) $(-> $...
10
99
101
9bb9924b14ef4e065abcdbe119f4a2a050b1bbb1
MSxDOS
2019-01-06T15:13:37
Update clippy-related lints
diff --git a/src/lib.rs b/src/lib.rs index eb7fbf4..a33cc89 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,10 +34,8 @@ #![no_std] #![deny(unused, unused_qualifications)] #![warn(unused_attributes)] -#![allow(bad_style, overflowing_literals, unused_macros)] +#![allow(bad_style, overflowing_literals, unused_macros, c...
1
1
3
016cd4beebc0a2cf88fc3f410748179806690746
MSxDOS
2019-01-06T15:04:33
Migrate to Rust 2018
diff --git a/Cargo.toml b/Cargo.toml index bcb9c44..4087e80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,7 @@ readme = "README.md" categories = ["external-ffi-bindings", "no-std", "os::windows-apis"] keywords = ["windows", "ffi", "ntapi", "native", "win32"] include = ["src/**/*", "Cargo.toml", "build.rs", "...
19
56
55
c9f683c4aae0074f59a7c256e822f7014fd27665
MSxDOS
2018-10-01T21:15:38
Bump version
diff --git a/Cargo.toml b/Cargo.toml index 6cdcc02..bcb9c44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntapi" -version = "0.1.1" +version = "0.2.0" authors = ["MSxDOS <melcodos@gmail.com>"] description = "FFI bindings for Native API" license = "Apache-2.0 OR MIT"
1
1
1
a002ae5c818f03c88b3684b26309748b2c8c1426
MSxDOS
2018-10-01T21:09:54
Optimize imports
diff --git a/src/ntexapi.rs b/src/ntexapi.rs index 3edd94d..ac487b5 100644 --- a/src/ntexapi.rs +++ b/src/ntexapi.rs @@ -6,19 +6,18 @@ use core::mem::uninitialized; #[cfg(target_arch = "x86")] use core::sync::atomic::spin_loop_hint; -use ntapi_base::{CLIENT_ID, KPRIORITY}; +use ntapi_base::{CLIENT_ID, KPRIORITY, KSY...
6
16
18
8e849b48b034606b8b8bc34068c2972280301629
MSxDOS
2018-10-01T20:36:35
Move to winapi 0.3.6 and get rid of CRLF
diff --git a/Cargo.toml b/Cargo.toml index a9aa88f..6cdcc02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ default-target = "x86_64-pc-windows-msvc" features = ["func-types", "nightly"] [dependencies.winapi] -version = "0.3.5" +version = "0.3.6" features = ["cfg", "evntrace", "in6addr", "inaddr", "minw...
3
7
49
6a85102fc5402abf5a917c6c44f8c7de50d28a7b
MSxDOS
2018-10-01T19:48:12
Remove #[doc(hidden)] from winapi
diff --git a/src/lib.rs b/src/lib.rs index f9379f4..eb7fbf4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,6 @@ #![cfg_attr(feature = "cargo-clippy", allow(clippy::cast_lossless, clippy::cast_ptr_alignment, clippy::len_without_is_empty, clippy::trivially_copy_pass_by_ref, clippy::unreadable_literal))] #[doc(hi...
1
0
1
67037087dd0e46e09995420003d718f89e3c24b0
Dirkjan Ochtman
2025-11-19T13:51:03
Upgrade some dev-dependencies
diff --git a/Cargo.toml b/Cargo.toml index 1b8f65b..219e2e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,12 +28,12 @@ futures = { version = "0.3.0", default-features = true, features=["async-await"] futures-test = { version = "0.3.0", default-features = true } pin-utils = "0.1.0" criterion = "0.3.0" -crossbeam = ...
2
8
5
0b6c5287b95a23287c8959083bcb4945909bc25a
Dirkjan Ochtman
2025-11-19T13:33:30
Apply clippy suggestions
diff --git a/benches/mpmc_channel.rs b/benches/mpmc_channel.rs index c80d5a1..b92239b 100644 --- a/benches/mpmc_channel.rs +++ b/benches/mpmc_channel.rs @@ -146,7 +146,7 @@ fn futchan_bounded_variable_tx_single_thread(producers: usize) { block_on(async { let (tx, mut rx) = futures::channel::mpsc::channe...
22
164
142
673efd62baf75b648ec134fef65fe0b153a6a6a6
Dirkjan Ochtman
2025-11-19T13:15:38
Clean up rustc warnings
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index 54d417a..c666125 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -92,6 +92,7 @@ where } } + #[cfg(feature = "alloc")] fn clear(&mut self) { while !self.buffer.is_empty() { self.buffer.pop(); @@ -423,...
6
16
15
91d895de6fadac303a6045d125b2268f7193f7b9
Matthias Einwag
2022-11-04T06:09:17
Make NoopLock private Resolves #42
diff --git a/src/lib.rs b/src/lib.rs index 8cf616e..25467d7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -220,7 +220,7 @@ extern crate alloc; mod noop_lock; -pub use noop_lock::NoopLock; +use noop_lock::NoopLock; pub mod buffer;
1
1
1
f6f018406e845ab1545d961125d236018e495d70
Matthias Einwag
2022-11-04T05:45:22
Revert parking lot to 0.11 and bump version
diff --git a/Cargo.toml b/Cargo.toml index 82834c0..420b367 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "futures-intrusive" edition = "2018" -version = "0.4.1" +version = "0.4.2" authors = ["Matthias Einwag <matthias.einwag@live.com>"] license = "MIT OR Apache-2.0" repository = "http...
1
2
2
76a649ae3bd386e065a3cc66d56c7076c74487f0
Matthias Einwag
2022-10-23T21:18:05
Update tokio dev-dependency
diff --git a/Cargo.toml b/Cargo.toml index 993b58e..82834c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ crossbeam = "0.7" # For channel benchmarks lazy_static = "1.4.0" rand = "0.7" async-std = "1.4" # For benchmarks -tokio = { version = "0.2.11", features = ["full"] } # For channel benchmarks +tokio ...
3
4
4
c469a85137ddbfcc0c473bfcd14d97bb067f11f0
Matthias Einwag
2022-10-23T21:06:55
Bump version to 0.4.1
diff --git a/Cargo.toml b/Cargo.toml index 4ac7d50..993b58e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "futures-intrusive" edition = "2018" -version = "0.4.0" +version = "0.4.1" authors = ["Matthias Einwag <matthias.einwag@live.com>"] license = "MIT OR Apache-2.0" repository = "http...
1
1
1
842c2b1ac9390bee257a6cd5d50271ef7d298147
alexmoon
2022-05-15T19:19:20
Fix LinkedList unsoundness (#63)
diff --git a/src/intrusive_double_linked_list.rs b/src/intrusive_double_linked_list.rs index 49314a4..f87f3e1 100644 --- a/src/intrusive_double_linked_list.rs +++ b/src/intrusive_double_linked_list.rs @@ -81,12 +81,29 @@ impl<T> LinkedList<T> { } } - /// Returns the first node in the linked list with...
3
40
6
11e1e1c7dfa2a22057fd0848ec9fd7147ab2ef95
Paolo Barbolini
2022-02-04T05:10:20
Bump parking_lot to 0.12 (#62)
diff --git a/Cargo.toml b/Cargo.toml index dad024d..4ac7d50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ default = ["std"] [dependencies] futures-core = { version = "^0.3", default-features = false } lock_api = "0.4.1" -parking_lot = { version = "0.11.0", optional = true } +parking_lot = { version = "0...
1
1
1
01f7a6b0b500d5634418ac1e269e0285feaec76c
eupn
2021-03-16T15:45:13
mpmc.rs: fix doc comment typo (#58)
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index 88a9dbe..54d417a 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -353,7 +353,7 @@ where /// concurrent tasks. /// /// `A` represents the backing buffer for a Channel. E.g. a channel which -/// can buffer up to 4 u32 values can be created via:...
1
1
1
8783a08e71694b7a5eb4fbc7cd95379b6de0d290
Ammar Askar
2020-11-01T07:13:30
Add a Sync bound for GenericMutexGuard. Fixes #53. (#54)
diff --git a/src/sync/mutex.rs b/src/sync/mutex.rs index c301548..a26f472 100644 --- a/src/sync/mutex.rs +++ b/src/sync/mutex.rs @@ -310,6 +310,13 @@ impl<MutexType: RawMutex, T> DerefMut for GenericMutexGuard<'_, MutexType, T> { } } +// Safety: GenericMutexGuard may only be used across threads if the underlyin...
1
7
0
9ee6993ec7619f87dbbf0c995c19ef24b26586e6
jean-airoldie
2020-09-14T03:04:36
Add shared semaphore implementation (#45)
diff --git a/src/sync/mod.rs b/src/sync/mod.rs index f59b9c6..003f8f3 100644 --- a/src/sync/mod.rs +++ b/src/sync/mod.rs @@ -32,5 +32,8 @@ pub use self::semaphore::{ #[cfg(feature = "alloc")] pub use self::semaphore::{ - Semaphore, SemaphoreAcquireFuture, SemaphoreReleaser, + GenericSharedSemaphore, GenericSh...
3
273
2
e4abf5a22e41d9cac876d19e2aea36e2cb93c7bb
jean-airoldie
2020-09-14T02:59:40
Upgrade dependencies (#50) * Upgrade dependencies * Update Cargo.toml Co-authored-by: Matthias Einwag <matthias.einwag@live.com>
diff --git a/Cargo.toml b/Cargo.toml index 1c8014c..c0d10db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,14 +19,14 @@ std = ["alloc"] default = ["std"] [dependencies] -futures-core = { version = "0.3.0", default-features = false } -lock_api = "0.3.2" -parking_lot = { version = "0.10", optional = true } +futures-...
2
5
5
3e60a5090c677a95b8445e7bbfa6e9a1ba0b5728
Vivian
2020-09-14T02:22:20
Expose channel::ChannelStream (#43) The `channel::mpmc::ChannelStream` type is returned by `channel::GenericChannel::stream`, but the type wasn't exposed so the return type couldn't be named. This exposes it from `channel`. Signed-off-by: Vivian Hellyer <vivian@hellyer.dev>
diff --git a/src/channel/mod.rs b/src/channel/mod.rs index 2aa96b5..8ceb2c0 100644 --- a/src/channel/mod.rs +++ b/src/channel/mod.rs @@ -42,7 +42,9 @@ pub use self::state_broadcast::StateBroadcastChannel; mod mpmc; -pub use self::mpmc::{GenericChannel, LocalChannel, LocalUnbufferedChannel}; +pub use self::mpmc::{ ...
1
3
1
a476331637d129f694fee36bfe0c9c96bcf6d3a7
jean-airoldie
2020-09-14T02:20:07
Add SharedStream::close method (#49) This allow the user to close the channel via the stream.
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index 7d4aaad..d4a7ec5 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -9,6 +9,7 @@ use crate::{ use core::{marker::PhantomData, pin::Pin}; use futures_core::{ future::Future, + ready, stream::{FusedStream, Stream}, task::{Context,...
2
47
40
a4d04f6b788120a9144ace0a186755a15503206e
jean-airoldie
2020-09-14T01:43:35
Dropping the last GenericReceiver now clears the channel (#47) This allows the content of the channel to be dropped even if all the senders are not dropped.
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index c97d76e..7d4aaad 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -92,6 +92,12 @@ where } } + fn clear(&mut self) { + while !self.buffer.is_empty() { + self.buffer.pop(); + } + } + fn close(&mut...
2
46
0
4e69a77d2bc7921d12d903c7aadf83c4c8cc79eb
Matthias Einwag
2020-04-30T04:24:24
Bump version to 0.3.1
diff --git a/Cargo.toml b/Cargo.toml index 43b3a15..1c8014c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "futures-intrusive" edition = "2018" -version = "0.3.0" +version = "0.3.1" authors = ["Matthias Einwag <matthias.einwag@live.com>"] license = "MIT OR Apache-2.0" repository = "http...
1
1
1
cc74396744273ab79396e78524b61150be104278
Matthias Einwag
2020-04-30T04:19:25
Fix Clone implementation for GenericOneshotBroadcastReceiver Fixes #35
diff --git a/src/channel/oneshot_broadcast.rs b/src/channel/oneshot_broadcast.rs index c22cc87..9ad7278 100644 --- a/src/channel/oneshot_broadcast.rs +++ b/src/channel/oneshot_broadcast.rs @@ -307,7 +307,6 @@ mod if_alloc { /// /// Tasks can receive values from the channel through the `receive` method...
1
14
1
f65c85febd282e03521516cc9edd3841af58d99f
Gleb Pomykalov
2020-04-30T03:49:55
Expose NoopLock (#38)
diff --git a/src/lib.rs b/src/lib.rs index 6479801..c578f3c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -217,7 +217,7 @@ #![deny(bare_trait_objects)] mod noop_lock; -use noop_lock::NoopLock; +pub use noop_lock::NoopLock; pub mod buffer;
1
1
1
a0045025a439974c45d45300e0430bdec4ed07c2
Geoffry Song
2020-04-30T03:47:46
Implement TimerService with an intrusive pairing heap. (#36) * Implement TimerService with an intrusive pairing heap. This makes the timer more efficient when it has many nodes (O(1) rather than O(n) insertion, and amortized O(log n) removal). * Code review
diff --git a/src/intrusive_double_linked_list.rs b/src/intrusive_double_linked_list.rs index 1ef878c..5d33e91 100644 --- a/src/intrusive_double_linked_list.rs +++ b/src/intrusive_double_linked_list.rs @@ -81,56 +81,6 @@ impl<T> LinkedList<T> { } } - /// Inserts a node into the list in a way that the ...
4
483
162
4592e5e837d64dfa8f5138acb6c253e8868f5aee
jean-airoldie
2020-03-09T04:04:05
Added cancel method for the shared ChanncelSendFuture version (#32)
diff --git a/src/channel/channel_future.rs b/src/channel/channel_future.rs index a88fab0..399f5a6 100644 --- a/src/channel/channel_future.rs +++ b/src/channel/channel_future.rs @@ -430,6 +430,20 @@ mod if_alloc { pub(crate) _phantom: PhantomData<MutexType>, } + impl<MutexType, T> ChannelS...
2
148
0
34c02d5dbe03de35fb6aa9903a8db69e0f3571b5
jean-airoldie
2020-02-20T04:21:56
Added try_receive method to state broadcast channel (#31)
diff --git a/src/channel/state_broadcast.rs b/src/channel/state_broadcast.rs index d59be2f..40685ef 100644 --- a/src/channel/state_broadcast.rs +++ b/src/channel/state_broadcast.rs @@ -63,7 +63,7 @@ impl RecvWaitQueueEntry { /// Adapter trait that allows Futures to generically interact with Channel /// implementation...
2
62
9
e96c49be2d16ba656fb88f69241bf780fa588bba
Matthias Einwag
2020-02-02T22:49:52
Improve safety docs in linked list
diff --git a/src/intrusive_double_linked_list.rs b/src/intrusive_double_linked_list.rs index 853af7c..0387f81 100644 --- a/src/intrusive_double_linked_list.rs +++ b/src/intrusive_double_linked_list.rs @@ -62,23 +62,23 @@ impl<T> LinkedList<T> { } /// Consumes the list and creates an iterator over the linked...
1
22
11
4559fa204576b5fa91abd42fde7a6340021afba9
Matthias Einwag
2020-02-02T22:36:24
Fix rustfmt for Rust 1.41
diff --git a/tests/mpmc_channel.rs b/tests/mpmc_channel.rs index 6233b84..4eb3a51 100644 --- a/tests/mpmc_channel.rs +++ b/tests/mpmc_channel.rs @@ -1173,22 +1173,18 @@ mod if_std { let (sender, receiver) = channel::<i32>(5); - let stream = || { - async move { - send_stream...
1
10
14
d527794c53d1d9e254c5b2f7a53eda5c85ff724c
Matthias Einwag
2020-02-02T22:30:59
Use a debug_assert in linked list to check consistency
diff --git a/src/intrusive_double_linked_list.rs b/src/intrusive_double_linked_list.rs index f76baef..853af7c 100644 --- a/src/intrusive_double_linked_list.rs +++ b/src/intrusive_double_linked_list.rs @@ -207,7 +207,8 @@ impl<T> LinkedList<T> { let prev = (*item).prev; if prev.is_null() { - ...
1
5
5
eb4e8dbff3ab58bb97a175021979717c84de73ad
jean-airoldie
2020-01-15T18:12:32
Correctly export CloseStatus in channel root (#29)
diff --git a/src/channel/mod.rs b/src/channel/mod.rs index e2b8c80..f5f5149 100644 --- a/src/channel/mod.rs +++ b/src/channel/mod.rs @@ -8,10 +8,12 @@ pub use self::error::{ChannelSendError, TryReceiveError, TrySendError}; mod channel_future; use channel_future::{ - ChannelReceiveAccess, ChannelSendAccess, Close...
1
5
3
181dbb11739202e1c7fc6185536505cff397444c
Matthias Einwag
2020-01-15T06:56:51
Add a Semaphore benchmark
diff --git a/Cargo.toml b/Cargo.toml index c4390f9..5c3931b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ crossbeam = "0.7" # For channel benchmarks lazy_static = "1.4.0" rand = "0.7" async-std = "1.4" # For benchmarks -tokio = { version = "0.2.6", features = ["full"] } # For channel benchmarks +tokio =...
2
218
1
2ff9847aa0fdb81664a2296225d7d58afe2a57c6
Matthias Einwag
2020-01-14T06:45:25
Wake tasks waiting on the channel outside of mutex This change wakes sending and receiving tasks waiting on the MPMC channel to get ready outside of the synchronous Mutex. This increases the performance of the channel.
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index f71f4e6..679d40d 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -10,7 +10,7 @@ use core::{marker::PhantomData, pin::Pin}; use futures_core::{ future::Future, stream::{FusedStream, Stream}, - task::{Context, Poll}, + task::{Cont...
1
91
45
f26a82bdeff282736fe9afde123f3b3884b0fa8d
jean-airoldie
2020-01-14T05:18:28
Updated {Oneshot,Broadcast}Channel::close signature (#27) Oneshot & broadcast channels now return `CloseStatus` when `close` is called, which allows the user to know if the channel was already closed.
diff --git a/src/channel/channel_future.rs b/src/channel/channel_future.rs index 4644b56..a88fab0 100644 --- a/src/channel/channel_future.rs +++ b/src/channel/channel_future.rs @@ -5,6 +5,35 @@ use core::pin::Pin; use futures_core::future::{FusedFuture, Future}; use futures_core::task::{Context, Poll, Waker}; +/// ...
8
77
58
603fa6fbf8c2a8959c5ad366d408fded9246e619
jean-airoldie
2020-01-14T04:38:14
Updated mpmc Channel::close method signature (#26) The Channel::close method now returns a `CloseStatus`. This allows the user to know whether the channel was already closed or not.
diff --git a/src/channel/mod.rs b/src/channel/mod.rs index 4b48d12..3b77ba5 100644 --- a/src/channel/mod.rs +++ b/src/channel/mod.rs @@ -40,7 +40,9 @@ pub use self::state_broadcast::StateBroadcastChannel; mod mpmc; -pub use self::mpmc::{GenericChannel, LocalChannel, LocalUnbufferedChannel}; +pub use self::mpmc::{ ...
3
63
20
ff7eb703d978a8842d45a335ad8507c928aef147
Matthias Einwag
2020-01-05T04:48:21
Wake Waker in Mutex outside of synchronous Mutex Waking a Waker inside a synchronous Mutex can lead the next task to get scheduled very quickly and immediately getting blocked on the synchronous Mutex. In this case the thread executing this task might need to get yield and scheduled again later. In order to avoid the ...
diff --git a/src/sync/mutex.rs b/src/sync/mutex.rs index 1341f4c..cfb17ab 100644 --- a/src/sync/mutex.rs +++ b/src/sync/mutex.rs @@ -66,8 +66,11 @@ impl MutexState { } } - /// Wakes up the last waiter and removes it from the wait queue - fn wakeup_last_waiter(&mut self) { + /// Returns the `Wak...
1
46
15
aab4c384123f19ced38879450a643465547b150a
Matthias Einwag
2020-01-04T08:53:39
Yield in Mutex benchmarks Async mutexes are intended to guard over longer time durations, which lead to blocking a task. In order to simulate the tasks being blocked for a longer time, the benchmark gets changed to let the task which holds a Mutex to yield to the executor for a certain amount of time.
diff --git a/benches/mutex.rs b/benches/mutex.rs index d0cf049..99647b4 100644 --- a/benches/mutex.rs +++ b/benches/mutex.rs @@ -9,8 +9,15 @@ use std::future::Future; use std::sync::Arc; use std::time::Duration; -const ITERATIONS: usize = 1000; +mod utils; +use utils::Yield; + +const ITERATIONS: usize = 300; const...
2
51
2
b353e934fea070aa2c6d61bf38630547c1405081
Matthias Einwag
2020-01-04T07:44:52
Update dev-dependency versions
diff --git a/Cargo.toml b/Cargo.toml index cda4df0..c4390f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,8 +30,8 @@ criterion = "0.3.0" crossbeam = "0.7" # For channel benchmarks lazy_static = "1.4.0" rand = "0.7" -async-std = "1.3" # For benchmarks -tokio = { version = "0.2.5", features = ["full"] } # For channe...
1
2
2
f499d45e07e4238d8dea5774074362ce6496da33
Matthias Einwag
2020-01-04T07:15:11
Use double linked list everywhere
diff --git a/src/channel/channel_future.rs b/src/channel/channel_future.rs index 6840faf..4644b56 100644 --- a/src/channel/channel_future.rs +++ b/src/channel/channel_future.rs @@ -1,5 +1,5 @@ use super::ChannelSendError; -use crate::intrusive_singly_linked_list::ListNode; +use crate::intrusive_double_linked_list::Lis...
7
18
403
24cc776038cbd4d4906604e0d7f671e1499cfccf
Matthias Einwag
2019-12-20T09:16:38
Reformat code for rust 1.40
diff --git a/benches/mpmc_channel.rs b/benches/mpmc_channel.rs index e4feb18..6355694 100644 --- a/benches/mpmc_channel.rs +++ b/benches/mpmc_channel.rs @@ -153,7 +153,7 @@ fn futchan_bounded_variable_tx_single_thread(producers: usize) { tx.send(4).await.unwrap(); } } ...
1
2
2
fb4f15f34f549615bd88d6f3c62c2c3d9c594944
Matthias Einwag
2019-12-19T15:08:36
Use double linked lists in sync primitives This increases the performance when the primitives are used from a big amount of tasks, at the cost of a minor memory increase (+1 pointer size per Future). Fixes #24
diff --git a/src/intrusive_double_linked_list.rs b/src/intrusive_double_linked_list.rs index c7dee34..f76baef 100644 --- a/src/intrusive_double_linked_list.rs +++ b/src/intrusive_double_linked_list.rs @@ -213,9 +213,7 @@ impl<T> LinkedList<T> { } self.head = (*item).next; } else { - ...
5
14
18
c716c5d64744107fe0925a6f9c18d0c03908980b
Matthias Einwag
2019-12-19T15:09:06
Upgrade tokio and async-std dev dependencies
diff --git a/Cargo.toml b/Cargo.toml index 31febde..cda4df0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,8 +30,8 @@ criterion = "0.3.0" crossbeam = "0.7" # For channel benchmarks lazy_static = "1.4.0" rand = "0.7" -async-std = "1.1" # For benchmarks -tokio = { version = "0.2.1", features = ["full"] } # For channe...
1
2
2
911fb12ba9fa96a597e52e15d1557c68790f850d
Matthias Einwag
2019-11-27T06:12:02
Fix benchmarks
diff --git a/Cargo.toml b/Cargo.toml index d498385..31febde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ default = ["std"] [dependencies] futures-core = { version = "0.3.0", default-features = false } -lock_api = "0.3.1" +lock_api = "0.3.2" parking_lot = { version = "0.10", optional = true } [dev-...
2
7
5
9687ce93924cd74e87d387cd30509d5064900cfc
Steven Fackler
2019-11-27T04:17:24
Upgrade parking_lot (#22)
diff --git a/Cargo.toml b/Cargo.toml index 85ff113..d498385 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ default = ["std"] [dependencies] futures-core = { version = "0.3.0", default-features = false } lock_api = "0.3.1" -parking_lot = { version = "0.9", optional = true } +parking_lot = { version = "0.1...
1
2
2
c46cc52d47ae8e037fb4b8a09f37aa4ee56ff249
jean-airoldie
2019-11-26T06:24:21
Add stream method to channel (#12) This method returns a type which implements Future::Stream.
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index 2e05014..bc0a1bd 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -6,8 +6,12 @@ use crate::{ utils::update_waker_ref, NoopLock, }; -use core::marker::PhantomData; -use futures_core::task::{Context, Poll}; +use core::{marker::PhantomDat...
2
408
45
7901c6616b7fbfe836edfa02e2115d098b37a6f1
Matthias Einwag
2019-11-13T03:54:56
benchmark both fair and unfair mutexes
diff --git a/benches/mutex.rs b/benches/mutex.rs index d29fbb2..3ace0e5 100644 --- a/benches/mutex.rs +++ b/benches/mutex.rs @@ -99,7 +99,7 @@ macro_rules! benchmarks { $mutex_name: literal, $mutex_constructor: expr ) => { $c.bench( - concat!($rt_name, "_", $mutex_name), + c...
1
31
7
68f0da08eaa1b785d651abe79c74789ebbfb0931
Angelo Bulfone
2019-11-12T06:13:51
Import `PhantomData` from `core` instead of `std` (#20) Only affects `state_broadcast.rs` for no_std.
diff --git a/src/channel/state_broadcast.rs b/src/channel/state_broadcast.rs index cfc29c9..131d880 100644 --- a/src/channel/state_broadcast.rs +++ b/src/channel/state_broadcast.rs @@ -6,13 +6,13 @@ use crate::{ utils::update_waker_ref, NoopLock, }; +use core::marker::PhantomData; use core::pin::Pin; use f...
1
1
1
1bed8c6f6554ec74a2c45c6f419e24e0484ca54b
Matthias Einwag
2019-11-12T02:53:32
Small cleanup in mpmc channel Instead of calling take_value_from_sender only under a certain precondition let the method return an Option, so that it can be called unconditionally and to have the precondition in the same place.
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index cad7b5e..2e05014 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -201,16 +201,21 @@ where last_waiter.state = SendPollState::SendComplete; - if let Some(ref handle) = &last_waiter.task { - handle.wake_b...
1
15
12
d6784471593dec991ef331e498663b5147f64c2f
Matthias Einwag
2019-11-12T02:42:33
Minor documentation updates
diff --git a/src/channel/error.rs b/src/channel/error.rs index 36b919d..fd55dd6 100644 --- a/src/channel/error.rs +++ b/src/channel/error.rs @@ -8,17 +8,17 @@ pub struct ChannelSendError<T>(pub T); /// The error which is returned when trying to receive from a channel -/// without blocking fails. +/// without waitin...
2
27
15
0e787d5bf748c8bd3ef38dff3a7dcfd1ab51e692
Matthias Einwag
2019-11-12T01:28:32
Update stored Wakers if polled again (#19) * Update stored Wakers if polled again If Futures are polled multiple times while not being able to make progress, we need to update the stored Waker. It is allowed to pass a different Waker to each poll call, and we should make sure to store the last Waker in order to ...
diff --git a/src/channel/mpmc.rs b/src/channel/mpmc.rs index d64eb05..5b63b0e 100644 --- a/src/channel/mpmc.rs +++ b/src/channel/mpmc.rs @@ -3,6 +3,7 @@ use crate::intrusive_singly_linked_list::{LinkedList, ListNode}; use crate::{ buffer::{ArrayBuf, RingBuf}, + utils::update_waker_ref, NoopLock, }; use...
17
316
41
5ddc3587ea71a5e2006d9d4ce4d0ce63b7b9d713
jean-airoldie
2019-11-12T01:06:38
Added try_send and try_receive methods (#14) * Added try_send and try_receive methods This allows a user to attempt to send & recv without blocking. Had to rename the methods of the ChannelSendAccess & ChannelReceiveAccess. * Added tests for potential deadlocks
diff --git a/src/channel/channel_future.rs b/src/channel/channel_future.rs index 10cf43c..6840faf 100644 --- a/src/channel/channel_future.rs +++ b/src/channel/channel_future.rs @@ -85,7 +85,7 @@ impl<T> SendWaitQueueEntry<T> { /// Adapter trait that allows Futures to generically interact with Channel /// implementati...
7
454
64
fa82f118c5958e6178b3546400ddca2af0270a82
jean-airoldie
2019-11-11T06:22:14
Added GrowingRingBuf implementation (#16) * Added GrowingRingBuf implementation This allows user to have channel whose capacity grows over time up to a certain limit. Added a ring buffer generic for shared channels that defaults to `HeapRingBuf` to preserve backward compat. * Renamed RingBuf implementations...
diff --git a/src/buffer/mod.rs b/src/buffer/mod.rs index 295d37a..8b047ec 100644 --- a/src/buffer/mod.rs +++ b/src/buffer/mod.rs @@ -4,7 +4,7 @@ mod real_array; pub use real_array::RealArray; mod ring_buffer; -pub use ring_buffer::{ArrayRingBuf, RingBuf}; +pub use ring_buffer::{ArrayBuf, GrowingHeapBuf, RingBuf}; ...
3
171
56
a24000b35c7b66616a6f1d1bce171e3fdb505631
Steven Fackler
2019-11-11T01:03:20
Remove a stray link in docs. (#17)
diff --git a/src/sync/manual_reset_event.rs b/src/sync/manual_reset_event.rs index 1611044..43fd213 100644 --- a/src/sync/manual_reset_event.rs +++ b/src/sync/manual_reset_event.rs @@ -303,7 +303,7 @@ mod if_std { // Export a thread-safe version using parking_lot::RawMutex - /// A [`GenericManualResetEvent`...
1
1
1
c016378ef4261712eb05d446651e4e08c4e36374
Matthias Einwag
2019-11-08T07:13:43
Bump version to 0.2.2
diff --git a/Cargo.toml b/Cargo.toml index 5caeebf..6ad3725 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "futures-intrusive" edition = "2018" -version = "0.2.1" +version = "0.2.2" authors = ["Matthias Einwag <matthias.einwag@live.com>"] license = "MIT OR Apache-2.0" repository = "http...
1
1
1
dd0ef7fdcf463ef8831ebd98f06329b08c5cfc4c
Matthias Einwag
2019-11-08T07:13:13
Fix the unbuffered channel typedef
diff --git a/examples/cancellation.rs b/examples/cancellation.rs index 62b2fd6..adf929d 100644 --- a/examples/cancellation.rs +++ b/examples/cancellation.rs @@ -80,7 +80,7 @@ //! be performed. This allows the user to retrieve the results of the algorithm. use futures_intrusive::{ - channel::LocalChannel, + ch...
3
16
12
86d0a00b2c950c0bfbcd3d267d728e7103f7a416
Matthias Einwag
2019-11-08T06:51:05
Use only the cancellation token for shut down Do not use the channels close method in the cancellation example, since we mainly want to demonstrate graceful cancellation via a cancellation token.
diff --git a/examples/cancellation.rs b/examples/cancellation.rs index 7ec0c66..62b2fd6 100644 --- a/examples/cancellation.rs +++ b/examples/cancellation.rs @@ -81,7 +81,7 @@ use futures_intrusive::{ channel::LocalChannel, - sync::ManualResetEvent, + sync::{LocalManualResetEvent, ManualResetEvent}, t...
1
39
12
ed091190fe7c99934c5b2fa296949f034e49956b
Travis Cross
2019-11-07T23:38:42
Fix/improve top-level documentation wording In this commit, we fix some grammatical errors and improve the fluency and clarity of the top-level crate documentation in `src/lib.rs`. No meaning was changed, and no substance was added or removed. This is just a rewording.
diff --git a/src/lib.rs b/src/lib.rs index 266e252..e890ea9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,9 +15,9 @@ //! ## Intrusive collections? //! //! In an intrusive collection, the elements that want to get stored inside the -//! collection are-providing the means to store themselves inside the collection. +...
1
61
64
1384149448256b57b84e7ec677c47864d007255b
Matthias Einwag
2019-11-08T06:30:03
Add an example for cancellation Adds an example that demonstrates how to achieve graceful cancellation and structured concurrency using Futures.
diff --git a/Cargo.toml b/Cargo.toml index 18352c7..5caeebf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,7 @@ crossbeam = "0.7" # For channel benchmarks lazy_static = "1.4.0" rand = "0.7" tokio = "0.2.0-alpha.6" # For channel benchmarks +signal-hook = "0.1.11" # For cancellation example [[bench]] name =...
2
288
0
f9f5473ced112cda3051d739c2e031a98b4eee72
Geoffry Song
2019-10-03T04:11:20
Grammar nits
diff --git a/src/sync/manual_reset_event.rs b/src/sync/manual_reset_event.rs index 1e7fb04..39c39d4 100644 --- a/src/sync/manual_reset_event.rs +++ b/src/sync/manual_reset_event.rs @@ -14,7 +14,7 @@ enum PollState { New, /// The task was added to the wait queue at the event. Waiting, - /// The task ha...
1
4
4
1a476a84d05b91f77eb27eaf9becace94bcbeb49
Geoffry Song
2019-10-03T04:07:48
Fix doc comments on ManualResetEvent aliases
diff --git a/src/sync/manual_reset_event.rs b/src/sync/manual_reset_event.rs index 8df4c59..1e7fb04 100644 --- a/src/sync/manual_reset_event.rs +++ b/src/sync/manual_reset_event.rs @@ -280,7 +280,7 @@ impl<'a, MutexType: RawMutex> Drop for GenericWaitForEventFuture<'a, MutexType> // Export a non thread-safe version ...
1
3
3
aab3e907baadaafc95e20c9d44756933e7815bc0
Matthias Einwag
2019-09-10T06:20:24
Add crossbeam channels to benchmark
diff --git a/Cargo.toml b/Cargo.toml index a16cf31..e61e424 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ futures-preview = { version = "0.3.0-alpha.18", default-features = true, feature futures-test-preview = { version = "0.3.0-alpha.18", default-features = true } pin-utils = "0.1.0-alpha.4" criterion ...
2
30
2
fd4088a6fff77ed6ecd373a82d5940f5c5737b3b
Matthias Einwag
2019-09-10T06:06:50
Clean up channel benchmark
diff --git a/benches/mpmc_channel.rs b/benches/mpmc_channel.rs index 521c407..1e6b243 100644 --- a/benches/mpmc_channel.rs +++ b/benches/mpmc_channel.rs @@ -60,63 +60,45 @@ fn tokiochan_bounded_variable_tx(producers: usize) { tokio_or_futures_channel_variable_tx!(producers, tokio::sync::mpsc::channel); } -/// v...
1
61
96
9e275713296e80719bf3c129b935716927a05222
Matthias Einwag
2019-09-10T05:55:26
Shared types are Clone, not Copy
diff --git a/src/lib.rs b/src/lib.rs index 3d2bfae..266e252 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -168,7 +168,7 @@ //! For some types also a shared flavor of the type is provided. Non-local //! flavors of types are `Sync`, but still can only be shared by reference //! between various tasks. -//! Shared flavors...
1
1
1
6cfe0ee7af9dda4bdcb254b32b536ab67b75dc3a
Matthias Einwag
2019-09-09T06:20:58
Include tokio channels in benchmarks
diff --git a/Cargo.toml b/Cargo.toml index bbfae39..a16cf31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ pin-utils = "0.1.0-alpha.4" criterion = "0.3.0" lazy_static = "1.4.0" rand = "0.7" +tokio = "0.2.0-alpha.4" # For channel benchmarks [[bench]] name = "mpmc_channel" diff --git a/benches/mpmc_cha...
2
90
58
bc08193976f0e804e44e2f152e7df3e52d43eb51
Matthias Einwag
2019-09-09T05:38:57
Fix some typos
diff --git a/examples/philosophers.rs b/examples/philosophers.rs index ca9e54b..fe8b891 100644 --- a/examples/philosophers.rs +++ b/examples/philosophers.rs @@ -118,7 +118,7 @@ async fn philosopher_task<'a>(name: &'a str, left_fork: &'a Fork, right_fork: &' } async fn simulate_philosophers() { - // Create the fo...
1
2
2
4b7132c95b88c131f9870961ce972925bb88c3e3
Matthias Einwag
2019-09-09T05:37:17
Update version to 2.0
diff --git a/Cargo.toml b/Cargo.toml index 7ffbd6c..bbfae39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "futures-intrusive" edition = "2018" -version = "0.1.1" +version = "0.2.0" authors = ["Matthias Einwag <matthias.einwag@live.com>"] license = "MIT OR Apache-2.0" repository = "http...
1
1
1