I’m sharing Silver code between my Cocoa shared library and my Island (Windows) DLL. I’m using the __lock keyword to protect a collection from concurrent access. In the Cocoa project, I was locking on a plain Object variable:
let someLock = Object()
However, this was causing build errors in the Island project:
Type mismatch, expected “RemObjects.Elements.System.Monitor!”
I therefore changed the object initialization to:
let someLock = Monitor()
Is this to be expected? I understand some parts of the documentation are not up to date but this surprised me.
Thanks.
-Benoît