diff options
| author | ruki <[email protected]> | 2022-04-06 22:40:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-04-06 22:40:37 +0800 |
| commit | 90ad0edfa8645b5b7044db79090ad90ac22a85a2 (patch) | |
| tree | 0f24a012796c0235d4ce7b26376c2483e5f1030d /tests/modules/pipe/pipe_pair.lua | |
| parent | cc8c6dee305ab37f2ba18bbd4d04cc62ad0a9f2e (diff) | |
improve pipe read
Diffstat (limited to 'tests/modules/pipe/pipe_pair.lua')
| -rw-r--r-- | tests/modules/pipe/pipe_pair.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/modules/pipe/pipe_pair.lua b/tests/modules/pipe/pipe_pair.lua index de81a3133..f6b2cb5b1 100644 --- a/tests/modules/pipe/pipe_pair.lua +++ b/tests/modules/pipe/pipe_pair.lua @@ -1,9 +1,11 @@ import("core.base.pipe") +import("core.base.bytes") function main() + local buff = bytes(8192) local rpipe, wpipe = pipe.openpair(4096) wpipe:write("hello xmake!", {block = true}) - local read, data = rpipe:read(13) + local read, data = rpipe:read(buff, 13) if read > 0 and data then data:dump() end |
