mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Benchmarks: Remove DispatchSemaphore hack from Monoids benchmark
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import TestsUtils
|
||||
import Dispatch
|
||||
|
||||
public let benchmarks = [
|
||||
BenchmarkInfo(
|
||||
@@ -8,13 +7,8 @@ public let benchmarks = [
|
||||
tags: [.algorithm, .miniapplication, .long])
|
||||
]
|
||||
|
||||
func run_Monoids(_ n: Int) {
|
||||
let semaphore = DispatchSemaphore(value: 0)
|
||||
func run_Monoids(_ n: Int) async {
|
||||
for _ in 0 ... n {
|
||||
Task {
|
||||
await run(output: false)
|
||||
semaphore.signal()
|
||||
}
|
||||
semaphore.wait()
|
||||
await run(output: false)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user