Comments (11)
+1
from async.
From migration-guide-swift4
reference.value = block()
change to reference.value = block(())
Maybe right!
from async.
This works for me:
private static func async<O>(after seconds: Double? = nil, block: @escaping () -> O, queue: GCD) -> AsyncBlock<Void, O> {
let reference = Reference<O>()
let block = DispatchWorkItem(block: {
reference.value = block()
})
if let seconds = seconds {
let time = DispatchTime.now() + seconds
queue.queue.asyncAfter(deadline: time, execute: block)
} else {
queue.queue.async(execute: block)
}
// Wrap block in a struct since @convention(block) () -> Swift.Void can't be extended
return AsyncBlock<Void, O>(block, output: reference)
}
from async.
I also need swift4, hoping to use it as soon as possible
from async.
Same issue.
from async.
#122 looks like it would fix this, fwiw
from async.
+1
from async.
+1
from async.
from async.
@duemunk Any updates on this? Thanks!
from async.
Fixed by #122
from async.
Related Issues (20)
- ITMS-90056 This bundle is invalid. The Info.plist file is missing the required key: CFBundleVersion HOT 6
- CompileSwift normal arm64 HOT 4
- Error on installation HOT 20
- Linux support HOT 4
- iOS deployment target issue HOT 1
- Chaining does not seem to be working HOT 3
- AsyncSwift.podspec is outdated HOT 14
- Does not support iOS8.0 HOT 1
- Error: This application’s bundle identifier does not match its code signing identifier
- Cannot load module 'async' as 'Async' HOT 1
- Does not support iOS 12 HOT 1
- update for version Swift 5 HOT 1
- Building from terminal as "xcodebuild build-for-testing -scheme <scheme>"
- SPM Compatibility HOT 7
- Lacking CocoaPods support HOT 3
- pass parameters through blocks HOT 1
- Escaping in a closure through blocks HOT 1
- Crash build on Linux HOT 1
- async swift libarclite error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async.