Functions

The following functions are available globally.

  • Synchronized pattern from Java. However, returning from the action is not possible in Swift.

    Declaration

    Swift

    public func synchronized(lock: AnyObject, @noescape action: () -> Void)

    Parameters

    lock

    Lock object

    action

    Block to run while synchronized