<commit_before>﻿using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Threading;

namespace Microsoft.CodeAnalysis.Editor.UnitTests
{
    // Starting with 15.3 the editor took a dependency on JoinableTaskContext
    // in Text.Logic and Intellisense layers as an editor host provided service.
    [PartCreationPolicy(CreationPolicy.NonShared)] // JTC is "main thread" affinitized so should not be shared
    internal class TestExportJoinableTaskContext
    {
        [Export]
        private JoinableTaskContext _joinableTaskContext = new JoinableTaskContext();
    }
}<commit_msg>go back to thread static JTC<commit_after>﻿using System;
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Threading;

namespace Microsoft.CodeAnalysis.Editor.UnitTests
{
    // Starting with 15.3 the editor took a dependency on JoinableTaskContext
    // in Text.Logic and Intellisense layers as an editor host provided service.
    [PartCreationPolicy(CreationPolicy.NonShared)] // JTC is "main thread" affinitized so should not be shared
    internal class TestExportJoinableTaskContext
    {
        [ThreadStatic]
        private static JoinableTaskContext s_jtcThreadStatic;

        [Export]
        private JoinableTaskContext _joinableTaskContext = s_jtcThreadStatic ?? (s_jtcThreadStatic = new JoinableTaskContext());
    }
}
{'fraction_non_alphanumeric': 0.0643491124260355, 'fraction_numerical': 0.004437869822485207, 'mean_word_length': 4.244186046511628, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4627023', 'n_tokens_mistral': 354, 'n_tokens_neox': 349, 'n_words': 108}