<commit_before>namespace Zipkin
{
	using System;
	using System.Collections.Concurrent;
	using System.Collections.Generic;
	using System.Threading;


	public class AsyncRecorder : Recorder
	{
		private readonly SpanDispatcher _dispatcher;
		private readonly ConcurrentQueue<Span> _enqueuedSpans = new ConcurrentQueue<Span>();
		private readonly AutoResetEvent _spansEnqueuedEvent = new AutoResetEvent(false);
		private int _disposed;

		public AsyncRecorder(SpanDispatcher dispatcher)
		{
			_dispatcher = dispatcher;

			new Thread(ThreadWorkProc)
			{
				IsBackground = true,
				Name = "ZipkinRecorder"
			}.Start();
		}

		public override void Record(params Span[] spans)
		{
			foreach (var span in spans)
			{
				_enqueuedSpans.Enqueue(span);
			}

			_spansEnqueuedEvent.Set();
		}
<commit_msg>adding volative to disposed flag<commit_after>namespace Zipkin
{
	using System;
	using System.Collections.Concurrent;
	using System.Collections.Generic;
	using System.Threading;


	public class AsyncRecorder : Recorder
	{
		private readonly SpanDispatcher _dispatcher;
		private readonly ConcurrentQueue<Span> _enqueuedSpans = new ConcurrentQueue<Span>();
		private readonly AutoResetEvent _spansEnqueuedEvent = new AutoResetEvent(false);
		private volatile int _disposed;

		public AsyncRecorder(SpanDispatcher dispatcher)
		{
			_dispatcher = dispatcher;

			new Thread(ThreadWorkProc)
			{
				IsBackground = true,
				Name = "ZipkinRecorder"
			}.Start();
		}

		public override void Record(params Span[] spans)
		{
			foreach (var span in spans)
			{
				_enqueuedSpans.Enqueue(span);
			}

			_spansEnqueuedEvent.Set();
		}

{'fraction_non_alphanumeric': 0.08088235294117647, 'fraction_numerical': 0.0, 'mean_word_length': 4.371710526315789, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6690245', 'n_tokens_mistral': 586, 'n_tokens_neox': 496, 'n_words': 121}