|
于 2011-11-14 15:21, Gerry Weaver 写道:
I'm not sure whether you mean native OS threads or Lua coroutines here by `producer thread' and `consumer threads'. If you used Lua coroutines, I think it should be OK to simply use the lua_xmove API. Or else, you should do some synchronization in C. And I found the Lanes[1] package would always be helpful in such cases. ----------------- [1] http://kotisivu.dnainternet.net/askok/bin/lanes/ |