Skip to content

Callback system #263

Answered by jugglerchris
J-Cake asked this question in Q&A
Dec 30, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi,
It would be useful to see which lines are causing the error messages, but, thinking aloud:

Arc<Lua> probably isn't what you want; Lua isn't Sync (i.e. it can't be shared between threads) so even if you sent the Arc<Lua> to another thread you wouldn't be allowed to use it. If you want to stay on one thread, I would use Rc<Lua> instead (or just Lua if you don't need to share it).

If you do want to share between threads (or use APIs which assume you might need to), then you probably want Arc<Mutex<Lua>>.

Chris

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@J-Cake
Comment options

@jugglerchris
Comment options

@J-Cake
Comment options

@jugglerchris
Comment options

Answer selected by J-Cake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants