authorgravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-07-29 17:12:33+09:00
committergravatar for kt@connectfree.co.jpkristopher tate <kt@connectfree.co.jp> 2018-08-02 16:59:11+09:00
log29057e5511ed007ee8db8306e89b674384c35964
tree07dff02ab98e77e5ff5489a26c75de25e0bc4ee3
parentd3f628907a6b9e5b863c9d5235e6dadf57f42ca2

std/event/channel.zig: remove promise_symbol from suspend and use @handle();

Tracking Issue #1296 ;

1 files changed, 4 insertions(+), 4 deletions(-)

std/event/channel.zig+4-4
......@@ -71,10 +71,10 @@ pub fn Channel(comptime T: type) type {
7171 /// puts a data item in the channel. The promise completes when the value has been added to the
7272 /// buffer, or in the case of a zero size buffer, when the item has been retrieved by a getter.
7373 pub async fn put(self: *SelfChannel, data: T) void {
74 suspend |handle| {
74 suspend {
7575 var my_tick_node = Loop.NextTickNode{
7676 .next = undefined,
77 .data = handle,
77 .data = @handle(),
7878 };
7979 var queue_node = std.atomic.Queue(PutNode).Node{
8080 .data = PutNode{
......@@ -96,10 +96,10 @@ pub fn Channel(comptime T: type) type {
9696 // TODO integrate this function with named return values
9797 // so we can get rid of this extra result copy
9898 var result: T = undefined;
99 suspend |handle| {
99 suspend {
100100 var my_tick_node = Loop.NextTickNode{
101101 .next = undefined,
102 .data = handle,
102 .data = @handle(),
103103 };
104104 var queue_node = std.atomic.Queue(GetNode).Node{
105105 .data = GetNode{