Great library! I made a few changes to allow use on Linux.
I haven't ever run into the race condition that the objc_sync functions are intended to avoid. The objc runtime isn't available on Linux, so this would require a different method to synchronize on that platform.
The lack of seamless bridging to NSString is one of the more polluting differences on Swift for Linux at the moment. Hopefully that restriction will be lifted in a forthcoming release. In any case, if you're running on Linux, you're probably not using a lot of Any expressions that would use NSString anyway.
Not sure why, but the import Dispatch is explicitly needed on Linux. It's apparently not in CoreFoundation. The import causes no harm on macOS or iOS.
Coverage remained the same at 100.0% when pulling 3ffb948c05ad506d9428d7dbff4fb94a3be43e97 on carter-thaxton:linux into bc4a5dffb880bf5fdb6c7c5f5e7b8101509770fb on nicklockwood:master.
Great library! I made a few changes to allow use on Linux.
I haven't ever run into the race condition that the
objc_sync
functions are intended to avoid. The objc runtime isn't available on Linux, so this would require a different method to synchronize on that platform.The lack of seamless bridging to
NSString
is one of the more polluting differences on Swift for Linux at the moment. Hopefully that restriction will be lifted in a forthcoming release. In any case, if you're running on Linux, you're probably not using a lot ofAny
expressions that would useNSString
anyway.Not sure why, but the
import Dispatch
is explicitly needed on Linux. It's apparently not in CoreFoundation. The import causes no harm on macOS or iOS.