Skip to content

Luchinkin/atomic-logs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Atomic logs

Logs built on top of atomic buffers without spinlocks by using 8 byte atomic operations. The best use case is multiprocessing architecture.

Example:

g_atomic_logs.push( "123", 4 );
for ( int i = 0; i < 1024; i++ )
{
	auto str = std::to_string( i );
	g_atomic_logs.push( str.c_str(), str.size() );
}

log_buffers_t output;
g_atomic_logs.pop( output );
for ( const auto& buf : output )
{
	const auto str = buf.str();
	if ( !str.empty() )
		std::cout << str.c_str() << std::endl;
}

About

Logs for MP arch without using any spinlocks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages