Files
Leeksov 4647310322 GLEGram 12.5 — Initial public release
Based on Swiftgram 12.5 (Telegram iOS 12.5).
All GLEGram features ported and organized in GLEGram/ folder.

Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass,
Font Replacement, Fake Profile, Chat Export, Plugin System, and more.

See CHANGELOG_12.5.md for full details.
2026-04-06 09:48:12 +03:00

37 lines
664 B
Swift

//
// RWLock.swift
// SwiftConcurrentCollections
//
// Created by Pete Prokop on 09/02/2020.
// Copyright © 2020 Pete Prokop. All rights reserved.
//
import Foundation
public final class RWLock {
private var lock: pthread_rwlock_t
// MARK: Lifecycle
deinit {
pthread_rwlock_destroy(&lock)
}
public init() {
lock = pthread_rwlock_t()
pthread_rwlock_init(&lock, nil)
}
// MARK: Public
public func writeLock() {
pthread_rwlock_wrlock(&lock)
}
public func readLock() {
pthread_rwlock_rdlock(&lock)
}
public func unlock() {
pthread_rwlock_unlock(&lock)
}
}