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 {...@@ -71,10 +71,10 @@ pub fn Channel(comptime T: type) type {
71 /// puts a data item in the channel. The promise completes when the value has been added to the71 /// puts a data item in the channel. The promise completes when the value has been added to the
72 /// buffer, or in the case of a zero size buffer, when the item has been retrieved by a getter.72 /// buffer, or in the case of a zero size buffer, when the item has been retrieved by a getter.
73 pub async fn put(self: *SelfChannel, data: T) void {73 pub async fn put(self: *SelfChannel, data: T) void {
74 suspend |handle| {74 suspend {
75 var my_tick_node = Loop.NextTickNode{75 var my_tick_node = Loop.NextTickNode{
76 .next = undefined,76 .next = undefined,
77 .data = handle,77 .data = @handle(),
78 };78 };
79 var queue_node = std.atomic.Queue(PutNode).Node{79 var queue_node = std.atomic.Queue(PutNode).Node{
80 .data = PutNode{80 .data = PutNode{
...@@ -96,10 +96,10 @@ pub fn Channel(comptime T: type) type {...@@ -96,10 +96,10 @@ pub fn Channel(comptime T: type) type {
96 // TODO integrate this function with named return values96 // TODO integrate this function with named return values
97 // so we can get rid of this extra result copy97 // so we can get rid of this extra result copy
98 var result: T = undefined;98 var result: T = undefined;
99 suspend |handle| {99 suspend {
100 var my_tick_node = Loop.NextTickNode{100 var my_tick_node = Loop.NextTickNode{
101 .next = undefined,101 .next = undefined,
102 .data = handle,102 .data = @handle(),
103 };103 };
104 var queue_node = std.atomic.Queue(GetNode).Node{104 var queue_node = std.atomic.Queue(GetNode).Node{
105 .data = GetNode{105 .data = GetNode{