Skip to content

Commit

Permalink
fix(coswift.swift) default chan buffer count set to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
NianJi committed Mar 5, 2019
1 parent 515a73f commit c2473cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coswift/coswift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public func co_launch(queue: DispatchQueue? = nil, stackSize: UInt32? = nil, blo
public func await<T>(promise: Promise<T>) throws -> Resolution<T> {
if let _ = Coroutine.current() {

let chan = Chan<Resolution<T>>()
let chan = Chan<Resolution<T>>(buffCount: 1)

promise.then(work: { (value) -> Any in
chan.send_nonblock(val: Resolution<T>.fulfilled(value))
Expand Down

0 comments on commit c2473cd

Please sign in to comment.