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:
Norman Maurer authored and Cory Benfield committed 2018-03-06 00:32:05 +09:00
1 parent 01f74a4b4e
commit 784c5a7355
1 file changed
+1 -1
+1 -1
View File
@@ -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`).