luv/docs.md at master · luvit/luv
Bare libuv bindings for lua. Contribute to luvit/luv development by creating an account on GitHub.
https://github.com/luvit/luv/blob/master/docs.md#pseudo-types
GitHub - luvit/luv: Bare libuv bindings for lua
Bare libuv bindings for lua. Contribute to luvit/luv development by creating an account on GitHub.
https://github.com/luvit/luv
cmake で build
luv に CMake が付属しており簡単。
main loop を idle へ
重い処理を thread へ
あ
thread 間で受け渡しのできる型
threadargs: variable arguments (…) of type nil, boolean, number, string, or userdata
nvim ではそこで messagepack なわけか。
Kyoto Tycoon+Lua-JIT拡張+MessagePack=無敵 経由で The state of MessagePack in Lua をたどり着く。
If you want pure LuaJIT -> luajit-msgpack-pure
たしかに、これだ。
GitHub - catwell/luajit-msgpack-pure: MessagePack for LuaJIT (using FFI, no bindings, V4 API)
MessagePack for LuaJIT (using FFI, no bindings, V4 API) - catwell/luajit-msgpack-pure
https://github.com/catwell/luajit-msgpack-pure
- Windows なので
malloc
,free
,realloc
が cdef できなかったのを修正 function
とcdata
を nil にしてスキップする処理を追加してみた
結果、巨大なテーブルの pack/unpack でブロックしてしまう。
あとスレッド側のエラーハンドリングをしてないので、デバッガはアタッチできないし、何もわからない。
pcall
などでエラーメッセージを取得して、失敗した場合はエラーメッセージを投げるようにしてあげる必要がある。
なんとなく、使い方はわかった。 後で、アニメーションシステムを実装するときのインフラにも使えるかもしれない。 OpenGL のレンダースレッドと、シーン更新を分離する。