eonil
eonil

Reputation: 85975

Can I make multiple Lua VM in single thread?

As I know, I can make a Lua VM for each thread. But I'm not sure about multiple instances in a thread. Is this possible?

Upvotes: 4

Views: 942

Answers (3)

Dnyaneshwar Choure
Dnyaneshwar Choure

Reputation: 1

comparing two object references using the == operator to true only when both references to the same object .

Upvotes: 0

BMitch
BMitch

Reputation: 263587

You can create multiple states, but without threads or multiple processes, you'll only be able to run one of them at a time. Also, you cannot communicate between states in Lua's core, so you'll either need to write your own or find a library to perform any synchronization or inter-state communication.

Upvotes: 0

Puppy
Puppy

Reputation: 146910

Yes, you can just call the creation function repeatedly.

Upvotes: 6

Related Questions