NuGet Gallery Feed for ConcurrentFileWriterA class library for managing multi-threaded sequential write access to one or more files.
It is capable of flushing writes from multiple threads in batches by either hitting a specified size threshold or a specified inactivity time limit. It is also possible to write this batching information within the output file(s).
Note: This class should be injected as a single or static instance shared across all process threads.
Files will be locked exclusively from the first Write() call until FlushAndClose() or Dispose() is called (presently one of these *must* be explicitly called to ensure all data is flushed).
The ConcurrentFileWriter class can be found as an extension of System.IO
*** Full debugging source/symbols are available from http://srv.symbolsource.org/pdb/Public
Usage Example:
var cfw = new ConcurrentFileWriter(new ConcurrentFileWriterSettings {
flushTimeInMilliseconds = 5000,
flushSizeInBytes = 10000,
showWriteBatchingMarkers = true
});
//Pre-lock file (not required)
cfw.Write(@"c:\temp\test.log", null);
//Append a string (byte arrays can also be directly written)
cfw.WriteUtf8Line(@"c:\temp\test.log", "Test Line");
//Flush and unlock specified file (stop managing)
cfw.CloseManagedFile(@"c:\temp\test.log");
//Flush and unlock all managed files
cfw.Dispose();https://www.nuget.org/packages/ConcurrentFileWriter/2018-12-11T14:17:12Zhttps://www.nuget.org/packages/ConcurrentFileWriter/1.0.2ConcurrentFileWriter 1.0.2.02015-11-30T22:01:00Z2018-12-11T14:17:11Ztom3030https://www.nuget.org/profiles/tom3030A class library for managing multi-threaded sequential write access to one or more files.
It is capable of flushing writes from multiple threads in batches by either hitting a specified size threshold or a specified inactivity time limit. It is also possible to write this batching information within the output file(s).
Note: This class should be injected as a single or static instance shared across all process threads.
Files will be locked exclusively from the first Write() call until FlushAndClose() or Dispose() is called (presently one of these *must* be explicitly called to ensure all data is flushed).
The ConcurrentFileWriter class can be found as an extension of System.IO
*** Full debugging source/symbols are available from http://srv.symbolsource.org/pdb/Public
Usage Example:
var cfw = new ConcurrentFileWriter(new ConcurrentFileWriterSettings {
flushTimeInMilliseconds = 5000,
flushSizeInBytes = 10000,
showWriteBatchingMarkers = true
});
//Pre-lock file (not required)
cfw.Write(@"c:\temp\test.log", null);
//Append a string (byte arrays can also be directly written)
cfw.WriteUtf8Line(@"c:\temp\test.log", "Test Line");
//Flush and unlock specified file (stop managing)
cfw.CloseManagedFile(@"c:\temp\test.log");
//Flush and unlock all managed files
cfw.Dispose();https://www.nuget.org/packages/ConcurrentFileWriter/1.0.1ConcurrentFileWriter 1.0.1.02015-11-30T20:52:31Z2018-12-11T14:17:07Ztom3030https://www.nuget.org/profiles/tom3030A class library for managing multi-threaded sequential write access to one or more files.
It is capable of flushing writes from multiple threads in batches by either hitting a specified size threshold or a specified inactivity time limit. It is also possible to write this batching information within the output file(s).
Note: This class should be injected as a single or static instance shared across all process threads.
Files will be locked exclusively from the first Write() call until FlushAndClose() is called or the class is disposed.
The ConcurrentFileWriter class can be found as an extension of System.IO
*** Full debugging source/symbols are available from http://srv.symbolsource.org/pdb/Public
Usage Example:
var cfw = new ConcurrentFileWriter(new ConcurrentFileWriterSettings {
flushTimeInMilliseconds = 5000,
flushSizeInBytes = 10000,
showWriteBatchingMarkers = true
});
//Pre-lock file (not required)
cfw.Write(@"c:\temp\test.log", null);
//Append a string (byte arrays can also be directly written)
cfw.WriteUtf8Line(@"c:\temp\test.log", "Test Line");
//Flush and unlock specified file (stop managing)
cfw.CloseManagedFile(@"c:\temp\test.log");
//Flush and unlock all managed files
cfw.Dispose();https://www.nuget.org/packages/ConcurrentFileWriter/1.0.0ConcurrentFileWriter 1.0.0.02015-11-28T13:47:08Z2018-12-11T14:17:12Ztom3030https://www.nuget.org/profiles/tom3030A class library for managing multi-threaded sequential write access to one or more files.
It is capable of flushing writes from multiple threads in batches by either hitting a specified size threshold or a specified inactivity time limit. It is also possible to write this batching information within the output file(s).
Note: This class should be injected as a single or static instance shared across all process threads.
Files will be locked exclusively from the first Write() call until FlushAndClose() is called or the class is disposed.
The ConcurrentFileWriter class can be found as an extension of System.IO
*** Full debugging source/symbols are available from http://srv.symbolsource.org/pdb/Public
Usage Example:
var cfw = new ConcurrentFileWriter(new ConcurrentFileWriterSettings {
flushTimeInMilliseconds = 5000,
flushSizeInBytes = 10000,
showWriteBatchingMarkers = true
});
//Pre-lock file (not required)
cfw.Write(@"c:\temp\test.log", null);
//Append a string (byte arrays can also be directly written)
cfw.WriteUtf8Line(@"c:\temp\test.log", "Test Line");
//Flush and unlock specified file (stop managing)
cfw.CloseManagedFile(@"c:\temp\test.log");
//Flush and unlock all managed files
cfw.Dispose();