Skip to content

Commit

Permalink
wit: tweak poll-read-frame and retire block-read-frame
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Dec 6, 2023
1 parent cf11aae commit d6c574a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wit/deps/buffer-pool/buffer-pool.wit
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,11 @@ interface buffer-pool {
/// name: the name of the pool. you can use this for device.start().
create: static func(mode:buffering-mode, size:u32, buffer-num:u32, name:string) ->result<pool, buffer-error>;

block-read-frame: func()-> result<frame-info, buffer-error>;
poll-read-frame: func()-> result<frame-info, buffer-error>;
/// try to read frames.
/// this function returns 0 frames when
/// - max-results = 0
/// - or, no frames are immediately available
read-frames: func(max-results: u32)-> result<list<frame-info>, buffer-error>;

subscribe: func() -> pollable;

Expand Down

0 comments on commit d6c574a

Please sign in to comment.