Comments (3)
Hi.
Definitely something I wanted to do. I might pick that up when I have time. Meanwhile if you or anyone else wants to work on that just let me know.
from archery.
Yes, I think that will work. It is pretty much analogous to the SharedPointer
and SharedPointerKind
.
However, to implement WeakPointer::upgrade()
will be a bit tricker, but I think it can be done, but even without that method having a weak pointer already adds a lot of value.
from archery.
I was looking at the code a bit, and it seems that it's not clear how to implement it exactly in terms of traits and associated types.
The first idea which comes to my mind is to add the WeakPointerKind
trait and an associated type WeakPointer
(restricted to WeakPointerKind
trait) to SharedPointerKind
.
What do you think?
from archery.
Related Issues (8)
- Auto-derived `Clone` for something using `RcPointer` is unusable
- Support for `static-rc` behind a feature flag
- Make Arc optional
- `SharedPointer<T, P>: {Send,Sync}` should require `T: Send + Sync` HOT 1
- add `Clone` to `SharedPointerKind`'s constraints
- Tests fail in release profile HOT 1
- Support no-std (alloc) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from archery.