forked from shadowfacts/Tusker
24 lines
369 B
Swift
24 lines
369 B
Swift
//
|
|
// MainThreadBox.swift
|
|
// Tusker
|
|
//
|
|
// Created by Shadowfacts on 1/27/24.
|
|
// Copyright © 2024 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
struct MainThreadBox<T>: @unchecked Sendable {
|
|
private let _value: T
|
|
|
|
@MainActor
|
|
var value: T {
|
|
_value
|
|
}
|
|
|
|
@MainActor
|
|
init(value: T) {
|
|
self._value = value
|
|
}
|
|
}
|