mirror of
https://github.com/apple/swift-nio
synced 2026-11-27 05:04:22 +00:00
Declare ThreadSpecificVariable public (#102)
Motivation: It's often useful for users to be able to store a thread-specific value (and so also EventLoop specific). We have ThreadSpecificVariable for this which was internal. Modifications: Change ThreadSpecificVariable to be public. Result: Fixes [#61].
This commit is contained in:
1 parent
01f74a4b4e
commit
784c5a7355
1 file changed
+1
-1
@@ -130,7 +130,7 @@ final class Thread {
|
||||
/// returned by `currentValue` is defined per thread.
|
||||
///
|
||||
/// - note: `ThreadSpecificVariable` has reference semantics.
|
||||
internal struct ThreadSpecificVariable<T: AnyObject> {
|
||||
public struct ThreadSpecificVariable<T: AnyObject> {
|
||||
private let key: pthread_key_t
|
||||
|
||||
/// Initialize a new `ThreadSpecificVariable` without a current value (`currentValue == nil`).
|
||||
|
||||
Reference in new issue
Block a user