rsbind 0.6.0

Provide tools to bind rust trait with other language and export library artifact directly. Invoke rust functions just like you write it in native language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//
//  SynchronizedClosure.swift
//  DocsSDK
//
//  Created by zenghao on 2018/8/19.
//

import Foundation

let sema = DispatchSemaphore(value: 1)

func synchronized(_ closure: () -> ()) {
    sema.wait()
    closure()
    sema.signal()
}