diff options
| author | ame <[email protected]> | 2026-01-14 06:46:01 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2026-01-14 06:46:01 -0600 |
| commit | 5744d856e69f0fd1c518ad5ab6af716ac530382f (patch) | |
| tree | 7b2f71e0413cb52ac40bc35c5379ce2fa0739580 /docs/thread/buffer.md | |
| parent | 9a67405a0983a779fec7328a0767c4d7561c08ea (diff) | |
thread:detach and buffer __index improvmentsstate-copy-changes
Diffstat (limited to 'docs/thread/buffer.md')
| -rw-r--r-- | docs/thread/buffer.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/thread/buffer.md b/docs/thread/buffer.md index e366a33..65af0c0 100644 --- a/docs/thread/buffer.md +++ b/docs/thread/buffer.md @@ -12,6 +12,19 @@ the __index metamethod will index any value that is not a buffer.* method on the every other metamethod will be replaced with a proxy to the metamethod in the copied object +inner functions can be called using the : syntactic sugar + +``` +buffer = llby.thread.buffer(llby.crypto.sha1()) + +buffer:set(buffer:get():update("awa")) +--or +buffer:set(buffer.update(buffer:get(), "awa")) + +--is the same as +buffer:set(buffer:update("awa")) +``` + ### buffer:get buffer:get() |
