summaryrefslogtreecommitdiff
path: root/tests/modules/pipe
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-15 00:45:16 +0800
committerruki <[email protected]>2022-04-15 00:45:16 +0800
commit55f541667ccd31e67e61d7eeeeff412552336903 (patch)
tree63397ffb88713b8ee28522305c9cc8386b86246e /tests/modules/pipe
parenta61b2aa25af04eb75c6628fbb4f867c9a82ae72a (diff)
improve pipe mode
Diffstat (limited to 'tests/modules/pipe')
-rw-r--r--tests/modules/pipe/pipe_pair.lua2
-rw-r--r--tests/modules/pipe/sched_pipe_pair.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/modules/pipe/pipe_pair.lua b/tests/modules/pipe/pipe_pair.lua
index f6b2cb5b1..da38f81ff 100644
--- a/tests/modules/pipe/pipe_pair.lua
+++ b/tests/modules/pipe/pipe_pair.lua
@@ -3,7 +3,7 @@ import("core.base.bytes")
function main()
local buff = bytes(8192)
- local rpipe, wpipe = pipe.openpair(4096)
+ local rpipe, wpipe = pipe.openpair()
wpipe:write("hello xmake!", {block = true})
local read, data = rpipe:read(buff, 13)
if read > 0 and data then
diff --git a/tests/modules/pipe/sched_pipe_pair.lua b/tests/modules/pipe/sched_pipe_pair.lua
index be64d0011..840df0d2b 100644
--- a/tests/modules/pipe/sched_pipe_pair.lua
+++ b/tests/modules/pipe/sched_pipe_pair.lua
@@ -26,7 +26,7 @@ function _session_write(id, pipefile)
end
function _session(id)
- local rpipe, wpipe = pipe.openpair(256)
+ local rpipe, wpipe = pipe.openpair()
scheduler.co_start(_session_read, id, rpipe)
scheduler.co_start(_session_write, id, wpipe)
end