Lua sessions with dedicated "consoles" in a multi-threaded environment
There are many Lua sessions (each represented by its own lua_State) in an embedded multithreaded C ++ program. Each Lua session has a dedicated "console" represented by a C ++ object. This "console" is designed to provide session-specific stdin / stdout / stderr streams.
What's the correct way to deliver such a "console" to a Lua session?
What's the correct way to implement redirecting standard streams to / from such a console?
+3
source to share