lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello All,

I'm looking at adding a Lua scripting capability to an existing C program. The program is basically a producer/consumer type model. It has one producer thread and multiple consumer threads. I'm looking for a way to copy arbitrary/opaque data from the Lua state in the producer thread to a Lua state in one of the consumer threads. The C code does not need to have any knowledge of the data. The producer simply passes a void pointer to the consumers. I have looked at the docs and I have seen several posts on the topic, but not found anything very useful. I've done some limited experimentation with the generic stack functions, but they are extremely slow. Would anyone have any interesting ideas on how I can accomplish this with decent performance?

Thanks,
-G