Skip to content

Swap out Rc for Arc to make stories thread-safe.#1

Open
ndarilek wants to merge 1 commit intocaranatar:masterfrom
ndarilek:master
Open

Swap out Rc for Arc to make stories thread-safe.#1
ndarilek wants to merge 1 commit intocaranatar:masterfrom
ndarilek:master

Conversation

@ndarilek
Copy link

Thanks for this! I was looking for ways to use Twee files in Bevy. After using it in my build process to generate dialog clips from story files, I needed to load those stories as assets into the engine. Unfortunately, your use of Rc makes Story non-threadsafe, so I couldn't add it as a Bevy asset.

This PR swaps out your use of Rc with Arc. Haven't tested it yet, but it compiles, and I'm now able to work with stories as assets in Bevy.

@ndarilek
Copy link
Author

Hey, wanted to ping this PR. I'd rather stick with your upstream for now since this is the only change I need, but I'd like to use this parser in my engine and will be forking it next week so I can go ahead with that. I'd rather not maintain a fork just for this change if it can be avoided. :)

Thanks.

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

Successfully merging this pull request may close these issues.

1 participant