From dbc8475da4701923ea6f426fc12cb83960ef0fa9 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 30 Sep 2024 11:46:32 -0500 Subject: docs --- docs/thread.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/thread.md b/docs/thread.md index 00619ea..62e31bf 100644 --- a/docs/thread.md +++ b/docs/thread.md @@ -6,6 +6,18 @@ a thread-safe object buffer to easily transfer things between threads +you *can* index the buffer normally, but all data will be read only, and it does NOT work with the colon syntax + +i might be able to fix this in the future with a proxy function solution, the difficulty arrises when i have no way to tell if it is being sent as a dot function + +```lua +buffer = llib.thread.buffer(llib.crypto.md5()) +buffer.final(buffer:get()) --works fine, same as buffer:get().final(buffer:get()) +buffer:final() --does not work, this *would* expands to buffer.final(buffer), but unless the functions expects my specific buffer object (which is dumb), it will break +``` + +also, be careful sending userdata, lightuser data cant really be copied, user data will be memcpy'd (or will use __clone) + full example: ```lua -- cgit v1.2.3