• R/O
  • HTTP
  • SSH
  • HTTPS

KCD: Commit

main code repository.


Commit MetaInfo

Revisiona202008f64a5a43bd3db8a41ba79b593e6ac304c (tree)
Time2018-05-08 00:31:28
Authormasakih <masakih@user...>
Commitermasakih

Log Message

セマフォの使い方を

Change Summary

Incremental Difference

--- a/KCD/Future.swift
+++ b/KCD/Future.swift
@@ -92,14 +92,13 @@ final class Future<T> {
9292 init() {
9393
9494 // for await()
95- semaphore = DispatchSemaphore(value: 1)
96- semaphore?.wait()
95+ semaphore = DispatchSemaphore(value: 0)
9796 }
9897
9998 init(in queue: DispatchQueue = .global(), _ block: @escaping () throws -> T) {
10099
101- semaphore = DispatchSemaphore(value: 1)
102- semaphore?.wait()
100+ // for await()
101+ semaphore = DispatchSemaphore(value: 0)
103102
104103 queue.async {
105104
Show on old repository browser