Future<T> run<T>(Future<T> Function() callback) async { await acquire(); try { final result = await callback(); return result; } finally { release(); } }