NExtensions.Async 0.9.2
NExtensions.Async 🚀
High-performance async synchronization primitives for modern .NET applications
✨ What's Inside
NExtensions.Async provides a collection of essential async synchronization primitives designed to make concurrent programming safer and more intuitive:
- 🔒 AsyncLock - Mutual exclusion for async contexts
- 📚 AsyncReaderWriterLock - Concurrent reads, exclusive writes
- ⚡ AsyncLazy - Thread-safe lazy initialization for async operations
🎯 Why Choose NExtensions.Async?
- Performance First - Optimized for high-throughput applications
- Modern API - Built for async/await patterns
- Multi-Target - Supports .NET 6, 7, and 8
- Zero Dependencies - Lightweight and focused
- Production Ready - Thoroughly tested and benchmarked
🚀 Quick Start
dotnet add package NExtensions.Async
using NExtensions.Async;
// AsyncLock - Simple mutual exclusion
private readonly AsyncLock _lock = new();
public async Task SafeOperationAsync()
{
using (await _lock.LockAsync())
{
// Critical section - only one thread at a time
await DoSomethingAsync();
}
}
// AsyncReaderWriterLock - Concurrent reads, exclusive writes
private readonly AsyncReaderWriterLock _rwLock = new();
public async Task<string> ReadDataAsync()
{
using (await _rwLock.ReaderLockAsync())
{
// Multiple readers can access simultaneously
return await GetDataAsync();
}
}
// AsyncLazy - One-time initialization
private readonly AsyncLazy<ExpensiveResource> _resource =
new(() => ExpensiveResource.CreateAsync());
public async Task<string> UseResourceAsync()
{
var resource = await _resource.Value;
return resource.DoSomething();
}
📖 Documentation
Full documentation and examples coming soon! In the meantime, explore the well-documented source code and comprehensive unit tests.
🤝 Contributing
This project is in active development. Stay tuned for contribution guidelines!
📄 License
MIT License - see LICENSE for details.
Showing the top 20 packages that depend on NExtensions.Async.
| Packages | Downloads |
|---|---|
|
NExtensions.Benchmarking
Package Description
|
10 |
Initial release with AsyncReaderWriterLock, AsyncLazy, and AsyncLock implementations.
.NET 6.0
- No dependencies.
.NET 7.0
- No dependencies.
.NET 8.0
- No dependencies.