Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating skeletons in parallel is not thread safe #1

Open
jabuwu opened this issue Sep 27, 2022 · 0 comments
Open

Updating skeletons in parallel is not thread safe #1

jabuwu opened this issue Sep 27, 2022 · 0 comments

Comments

@jabuwu
Copy link
Owner

jabuwu commented Sep 27, 2022

I'm making a note of this here in case anyone tries it. It does not work. The primary suspects seems to be reference counting of attachments being non-atomic.

(*(c_attachment as *mut spAttachment)).refCount += 1;

Unfortunately, this is a non-trivial fix since the C code won't play nice with Rust atomics.

Skeletons which do not share attachments (skeletons that have a different SkeletonData as others) are probably fine to be updated in parallel.

Attachments in general are really unsafe and could use a proper Handle type to address them safely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant