From c2473cd9f59dac4d4261a61fb54e5bedf8e105c1 Mon Sep 17 00:00:00 2001 From: NianJi <765409243@qq.com> Date: Tue, 5 Mar 2019 13:09:43 +0800 Subject: [PATCH] fix(coswift.swift) default chan buffer count set to 1 --- coswift/coswift.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coswift/coswift.swift b/coswift/coswift.swift index 9c69374..107297f 100644 --- a/coswift/coswift.swift +++ b/coswift/coswift.swift @@ -52,7 +52,7 @@ public func co_launch(queue: DispatchQueue? = nil, stackSize: UInt32? = nil, blo public func await(promise: Promise) throws -> Resolution { if let _ = Coroutine.current() { - let chan = Chan>() + let chan = Chan>(buffCount: 1) promise.then(work: { (value) -> Any in chan.send_nonblock(val: Resolution.fulfilled(value))