I'm trying to find any code examples/docs about ObjectPooling in .NET 6.
I can see this exists in .NET 7 via these docs, but I'm unable to upgrade to .NET 7.
I did find -some- code somewhere (No I can't see where. It was on my work computer, not this one at home) that looked something like this:
using System.Buffers;
var sftpObjectPool = new ObjectPool<SftpClient>(() => new SftpClient(config), 50);
var sftpClient = sftpObjectPool.Get();
await sftpClient.UploadFileAsync(..);
sftpObjectPool.Return(sftpClient);
but I've not been able to find this class in the .NET BCL.
Is this possible?