Skip to content

Vi-Kitten/borrow-count

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Borrow Count

Memory that can be shared with a smart pointer and then reaquired with a future.

Example

let unique = Unique::new(0);
let (host, mut share) = unique.share_mut();
tokio::task::spawn(async move {
    tokio::time::sleep(std::time::Duration::from_millis(16)).await;
    *share += 1;
});
let unique = host.await;
assert_eq!(unique.into_inner(), 1)

About

Memory that can be shared with a smart pointer and then reaquired with a future.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages