Hiroaki Nakamura wrote: > How can we write that? Do we have to write that portion in C? > Or we can write the function called from pthread_create() in lua? You create a separate Lua state first, then define a callback function in *that* state and then use pthread_create() from the original state, passing the callback address of the other state. --Mike