Comments (4)
Yes, Mutex<Cc> should work.
from bacon-rajan-cc.
Actually, I might be wrong. There's a thread local buffer and it's pretty believable that things could break if you share Cc's across threads.
from bacon-rajan-cc.
We should create a Acc
or something similar that can be sent or shared between threads. It seems like at the start of collect_cycle
we can run a trace()
over the nodes and lock all the ones that are going to take part in collect_cycles
, then use trace()
again to unlock all those nodes at the end of collect_cycles()
. So that multiple collect_cycles
from different threads can execute simultaneously if they are talking to independent nodes.
from bacon-rajan-cc.
I put up a prototype of what this could look like at https://github.com/jrmuizel/cc-mt
from bacon-rajan-cc.
Related Issues (19)
- CcBox (and likely Cc) need 'static (or !Drop) bound for soundness HOT 2
- data is deallocated while holding a mutable reference
- Add atomic support. HOT 1
- attempt to subtract with overflow HOT 2
- Crash on keeping weak references after collecting a cycle (minor bug)
- Free too soon in mark_roots() (suspected bug) HOT 3
- Add function to insure all memory is freed at the at the end of each test. HOT 1
- Miri flag passing changed HOT 1
- Update to be buildable with Nightly or Stable rust HOT 6
- "Invalid access during cycle collection" - collect_cycles() leaves live nodes with zero refs HOT 4
- Weak<> doesn't work properly HOT 1
- miri shows undefined behaviour when run with -Zmiri-tag-raw-pointers HOT 1
- Incorrect Docs for Trace
- Use-after-free? HOT 4
- Clarify Trace trait usage HOT 1
- Drop is unsound
- How to user #[derive(Trace)?] HOT 3
- Invalid Memory Access 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 bacon-rajan-cc.