This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoggerContext : IDisposable | |
{ | |
private readonly Thread _contextPump; | |
private readonly ManualResetEventSlim _resetHandle = new ManualResetEventSlim(false); | |
private readonly CancellationTokenSource _cts = new CancellationTokenSource(); | |
private ConcurrentQueue<Action> _logsQueue = new ConcurrentQueue<Action>(); | |
private readonly bool _flush; | |
public LoggerContext(bool flush = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Playground | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var result = new Solution().FlattenArray(new object[] |