C# Task.WaitAll 的用法

目录

简介

1.WaitAll(Task[], Int32, CancellationToken)

2.WaitAll(Task[])

3.WaitAll(Task[], Int32)

4.WaitAll(Task[], CancellationToken)

5.WaitAll(Task[], TimeSpan)

结束


简介

Task.WaitAll 是 C# 中用于并行编程的一个的方法,它属于 System.Threading.Tasks 命名空间。主要作用是等待提供的所有 Task 对象完成其执行过程。通过使用 Task.WaitAll,开发者可以确保一组并行执行的任务全部完成后,再继续执行后续的代码。这对于需要等待多个异步操作同时完成以继续执行其他操作的场景非常有用。

Task.WaitAll 方法有多个重载版本,以适应不同的需求。最基本的版本接收一个 Task 对象的数组作为参数,并等待这个数组中的所有任务完成。如果所有任务都成功完成,则该方法正常返回;如果有任何任务在执行过程中抛出了异常,这些异常会被封装在 AggregateException 中并抛出。如果任务被取消,AggregateException 的 InnerExceptions 集合中会包含 OperationCanceledException。

Task.WaitAll 还提供了带有超时和取消令牌的重载方法,允许开发者在指定的时间间隔内等待所有任务完成,或者如果等待被取消,则提前退出等待。这些重载版本为处理超时和取消操作提供了更灵活的方式。

Task.WaitAll 方法适用于多种场景,如同时处理多个数据库查询、同时下载多个文件或执行任何需要并行处理的任务集合。通过并行处理,可以显著提高应用程序的响应速度和吞

打开你的项目,利用 Visual Studio 2022 反编译功能看看当前的 WaitAll 是那个对应的版本,比如下图,我用的是 .NetFramework 4.8 

官方文档:点击跳转

定义
命名空间:
System.Threading.Tasks
程序集:
System.Runtime.dll
等待提供的所有 Task 对象完成执行过程。

WaitAll(Task[], Int32, CancellationToken)等待提供的所有 Task 对象在指定的毫秒数内完成执行,或等到取消等待
WaitAll(Task[])等待提供的所有 Task 对象完成执行过程。
WaitAll(Task[], Int32)等待所有提供的 Task 在指定的毫秒数内完成执行
WaitAll(Task[], CancellationToken)等待提供的所有 Task 对象完成执行过程(除非取消等待)
WaitAll(Task[], TimeSpan)等待所有提供的可取消 Task 对象在指定的时间间隔内完成执行

1.WaitAll(Task[], Int32, CancellationToken)

等待提供的所有 Task 对象在指定的毫秒数内完成执行,或等到取消等待。

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static bool WaitAll (System.Threading.Tasks.Task[] tasks, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken);

参数
tasks  Task[]
要等待的 Task 实例的数组。

millisecondsTimeout  Int32
等待的毫秒数,或为 Infinite (-1),表示无限期等待。

cancellationToken  CancellationToken
等待任务完成期间要观察的 CancellationToken。

返回
Boolean
如果在分配的时间内所有 true 实例都已完成执行,则为 Task;否则为 false。

属性 UnsupportedOSPlatformAttribute


例外
ObjectDisposedException
tasks 中的一个或多个 Task 对象已释放。

ArgumentNullException
tasks 参数为 null。

AggregateException
至少一个 Task 实例已取消。 如果任务已取消,则 AggregateException 在其 InnerExceptions 集合中包含 OperationCanceledException。

- 或 -

在至少一个 Task 实例的执行过程中引发了异常。

ArgumentOutOfRangeException
millisecondsTimeout 是一个非 -1 的负数,而 -1 表示无限期超时。

ArgumentException
tasks 参数包含一个 null 元素。

OperationCanceledException
已取消 cancellationToken。

注解
参数 cancellationToken 用于取消等待操作。 取消任务是一项不同的操作,由 AggregateException 上面提到的 发出信号。

Task.WaitAll 方法是并行执行所有传入的任务,而不是按顺序一个接一个地执行。Task 是基于 .NET 的异步编程模型,利用多核 CPU 的优势来提高性能,并同时多个任务执行。

Task.WaitAll 在执行时,所有的任务会几乎同时启动,具体的执行顺序取决于线程调度和系统资源。系统会根据可用的线程和 CPU 核心来调度这些任务。这意味着,任务的完成顺序可能与它们在代码中添加到列表的顺序不同。

Task.WaitAll 方法会阻塞调用线程,直到所有任务都完成。

新建一个 .NET Framework 4.8 的 控制台项目,就当前的方法写一个案例:

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;namespace task_test1
{internal class Program{static CancellationTokenSource cts = new CancellationTokenSource();static void Main(string[] args){int timeout = 1000;List<Task<(string, bool)>> taskList = new List<Task<(string, bool)>>();taskList.Add(PingTest("https://github.com/"));taskList.Add(PingTest("https://www.csdn.net/"));taskList.Add(PingTest("https://www.zhihu.com/"));taskList.Add(PingTest("https://www.microsoft.com/zh-cn/"));taskList.Add(PingTest("https://www.baidu.com/"));Task<(string, bool)>[] tasks = taskList.ToArray();try{bool allCompleted = Task.WaitAll(tasks, timeout, cts.Token);Console.WriteLine("执行结果:{0}", allCompleted);foreach (var task in tasks){var tuple = task.Result;Console.WriteLine($"result:{tuple.Item2},url:{tuple.Item1}");}}catch (Exception ex){Console.WriteLine("错误:{0}", ex.Message);}Console.ReadKey();}static async Task<(string, bool)> PingTest(string ip){cts.Token.ThrowIfCancellationRequested();PingTool tool = new PingTool();bool result = await tool.Ping(ip, cts);return (ip, result);}}
}internal class PingTool
{public async Task<bool> Ping(string url, CancellationTokenSource cts){if (string.IsNullOrEmpty(url))return false;try{using (HttpClient client = new HttpClient()){client.Timeout = TimeSpan.FromSeconds(5);cts.Token.ThrowIfCancellationRequested();var response = await client.GetAsync(url, cts.Token);return response.IsSuccessStatusCode;}}catch (Exception){return false;}}
}

运行:

代码中 int timeout = 1000,也就是1秒,在超时的情况下,Task.WaitAll 会返回 false,但是5个 Task 依然全部执行了,所以,timeout 影响的也只有 task 的返回结果了

不超时会返回 true


 

2.WaitAll(Task[])

等待提供的所有 Task 对象完成执行过程。

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static void WaitAll (params System.Threading.Tasks.Task[] tasks);

参数

tasks  Task[]
要等待的 Task 实例的数组。

属性  UnsupportedOSPlatformAttribute


例外
ObjectDisposedException
tasks 中的一个或多个 Task 对象已释放。

ArgumentNullException
tasks 参数为 null。

ArgumentException
tasks 参数包含一个 null 元素。

AggregateException
至少一个 Task 实例已取消。 如果任务取消,则 AggregateException 异常在其 InnerExceptions 集合中包含 OperationCanceledException 异常。

- 或 -

在至少一个 Task 实例的执行过程中引发了异常
 

C# 案例:

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;namespace task_test1
{internal class Program{static void Main(string[] args){List<Task<(string, bool)>> taskList = new List<Task<(string, bool)>>();taskList.Add(PingTest("https://www.csdn.net/"));taskList.Add(PingTest("https://www.zhihu.com/"));taskList.Add(PingTest("https://www.microsoft.com/zh-cn/"));taskList.Add(PingTest("https://www.baidu.com/"));taskList.Add(PingTest("https://github.com/"));Task.WaitAll(taskList.ToArray());Console.ReadKey();}static async Task<(string, bool)> PingTest(string ip){PingTool tool = new PingTool();bool result = await tool.Ping(ip);Console.WriteLine("result:{0},时间:{1},url:{2}", result, DateTime.Now, ip);return (ip, result);}}
}internal class PingTool
{public async Task<bool> Ping(string url){if (string.IsNullOrEmpty(url))return false;try{using (HttpClient client = new HttpClient()){client.Timeout = TimeSpan.FromSeconds(5);var response = await client.GetAsync(url);return response.IsSuccessStatusCode;}}catch (System.Exception){return false;}}
}

运行:

3.WaitAll(Task[], Int32)

等待所有提供的 Task 在指定的毫秒数内完成执行。

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static bool WaitAll (System.Threading.Tasks.Task[] tasks, int millisecondsTimeout);

参数
tasks  Task[]
要等待的 Task 实例的数组。

millisecondsTimeout  Int32
等待的毫秒数,或为 Infinite (-1),表示无限期等待。

返回
Boolean
如果在分配的时间内所有 true 实例都已完成执行,则为 Task;否则为 false。

属性   UnsupportedOSPlatformAttribute


例外
ObjectDisposedException
tasks 中的一个或多个 Task 对象已释放。

ArgumentNullException
tasks 参数为 null。

AggregateException
至少一个 Task 实例已取消。 如果任务已取消,则 AggregateException 在其 InnerExceptions 集合中包含 OperationCanceledException。

- 或 -

在至少一个 Task 实例的执行过程中引发了异常。

ArgumentOutOfRangeException
millisecondsTimeout 是一个非 -1 的负数,而 -1 表示无限期超时。

ArgumentException
tasks 参数包含一个 null 元素。

C# 案例:

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;namespace task_test1
{internal class Program{static void Main(string[] args){int timeout = 3000;List<Task<(string, bool)>> taskList = new List<Task<(string, bool)>>();taskList.Add(PingTest("https://github.com/"));taskList.Add(PingTest("https://www.csdn.net/"));taskList.Add(PingTest("https://www.zhihu.com/"));taskList.Add(PingTest("https://www.microsoft.com/zh-cn/"));taskList.Add(PingTest("https://www.baidu.com/"));Task<(string, bool)>[] tasks = taskList.ToArray();bool allCompleted = Task.WaitAll(tasks, timeout);Console.WriteLine("执行结果:{0}", allCompleted);foreach (var task in tasks){var tuple = task.Result;Console.WriteLine($"result:{tuple.Item2},url:{tuple.Item1}");}Console.ReadKey();}static async Task<(string, bool)> PingTest(string ip){PingTool tool = new PingTool();bool result = await tool.Ping(ip);return (ip, result);}}
}internal class PingTool
{public async Task<bool> Ping(string url){if (string.IsNullOrEmpty(url))return false;try{using (HttpClient client = new HttpClient()){client.Timeout = TimeSpan.FromSeconds(5);var response = await client.GetAsync(url);return response.IsSuccessStatusCode;}}catch (System.Exception){return false;}}
}

运行:

4.WaitAll(Task[], CancellationToken)

等待提供的所有 Task 对象完成执行过程(除非取消等待)。

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static void WaitAll (System.Threading.Tasks.Task[] tasks, System.Threading.CancellationToken cancellationToken);

参数
tasks  Task[]
要等待的 Task 实例的数组。

cancellationToken  CancellationToken
等待任务完成期间要观察的 CancellationToken。

属性  UnsupportedOSPlatformAttribute


例外
OperationCanceledException
已取消 cancellationToken。

ArgumentNullException
tasks 参数为 null。

AggregateException
至少一个 Task 实例已取消。 如果任务已取消,则 AggregateException 在其 InnerExceptions 集合中包含 OperationCanceledException。

- 或 -

在至少一个 Task 实例的执行过程中引发了异常。

ArgumentException
tasks 参数包含一个 null 元素。

ObjectDisposedException
tasks 中的一个或多个 Task 对象已释放。

注解
参数 cancellationToken 用于取消等待操作。 取消任务是一项不同的操作,由 如上所述的 发出信号 AggregateException 。

关于取消任务为什么后续依然执行了,请参考第1节的解释

C# 案例:

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;namespace task_test1
{internal class Program{static CancellationTokenSource cts = new CancellationTokenSource();static void Main(string[] args){List<Task<(string, bool)>> taskList = new List<Task<(string, bool)>>();taskList.Add(PingTest("https://github.com/"));taskList.Add(PingTest("https://www.csdn.net/"));taskList.Add(PingTest("https://www.zhihu.com/"));taskList.Add(PingTest("https://www.microsoft.com/zh-cn/"));taskList.Add(PingTest("https://www.baidu.com/"));Task<(string, bool)>[] tasks = taskList.ToArray();Task.Run(() =>{Thread.Sleep(100);Console.WriteLine("取消任务");cts.Cancel();});Console.WriteLine("开始执行任务");try{Task.WaitAll(tasks, cts.Token);}catch (Exception ex){Console.WriteLine("错误:{0}", ex.Message);}Console.ReadKey();}static async Task<(string, bool)> PingTest(string ip){//方法 Task.WaitAll 执行任务会同时执行所有的Task,并等待任务完成//而不是一个个按顺序来执行,然后等待结果,所以注释的代码无效//if (cts.Token.IsCancellationRequested) //{//    Console.WriteLine($"Task for {ip} was cancelled before execution.");//    return (ip, false);//}//cts.Token.ThrowIfCancellationRequested();PingTool tool = new PingTool();bool result = await tool.Ping(ip, cts);Console.WriteLine("result:{0},url:{1}", result, ip);return (ip, result);}}
}internal class PingTool
{public async Task<bool> Ping(string url, CancellationTokenSource cts){if (string.IsNullOrEmpty(url))return false;try{using (HttpClient client = new HttpClient()){client.Timeout = TimeSpan.FromSeconds(5);cts.Token.ThrowIfCancellationRequested();var response = await client.GetAsync(url, cts.Token);return response.IsSuccessStatusCode;}}catch (Exception){return false;}}
}

运行:

5.WaitAll(Task[], TimeSpan)

等待所有提供的可取消 Task 对象在指定的时间间隔内完成执行。

[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static bool WaitAll (System.Threading.Tasks.Task[] tasks, TimeSpan timeout);

参数
tasks  Task[]
要等待的 Task 实例的数组。

timeout  TimeSpan
表示等待毫秒数的 TimeSpan,或表示 -1 毫秒(无限期等待)的 TimeSpan。

返回
Boolean
如果在分配的时间内所有 true 实例都已完成执行,则为 Task;否则为 false。

属性  UnsupportedOSPlatformAttribute


例外
ObjectDisposedException
tasks 中的一个或多个 Task 对象已释放。

ArgumentNullException
tasks 参数为 null。

AggregateException
至少一个 Task 实例已取消。 如果任务已取消,则 AggregateException 在其 InnerExceptions 集合中包含 OperationCanceledException。

- 或 -

在至少一个 Task 实例的执行过程中引发了异常。

ArgumentOutOfRangeException
timeout 为 -1 毫秒以外的负数,表示无限期超时。

- 或 -

timeout 大于 Int32.MaxValue。

ArgumentException
tasks 参数包含一个 null 元素。
 

C# 案例:

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;namespace task_test1
{internal class Program{static void Main(string[] args){List<Task<(string, bool)>> taskList = new List<Task<(string, bool)>>();taskList.Add(PingTest("https://github.com/"));taskList.Add(PingTest("https://www.csdn.net/"));taskList.Add(PingTest("https://www.zhihu.com/"));taskList.Add(PingTest("https://www.microsoft.com/zh-cn/"));taskList.Add(PingTest("https://www.baidu.com/"));Task<(string, bool)>[] tasks = taskList.ToArray();bool allCompleted = Task.WaitAll(tasks, TimeSpan.FromSeconds(1));Console.WriteLine("执行结果:{0}", allCompleted);foreach (var task in tasks){var tuple = task.Result;Console.WriteLine($"result:{tuple.Item2},url:{tuple.Item1}");}Console.ReadKey();}static async Task<(string, bool)> PingTest(string ip){PingTool tool = new PingTool();bool result = await tool.Ping(ip);return (ip, result);}}
}internal class PingTool
{public async Task<bool> Ping(string url){if (string.IsNullOrEmpty(url))return false;try{using (HttpClient client = new HttpClient()){client.Timeout = TimeSpan.FromSeconds(5);var response = await client.GetAsync(url);return response.IsSuccessStatusCode;}}catch (System.Exception){return false;}}
}

运行:

结束

如果这个帖子对你有用,欢迎 关注 + 点赞 + 留言,谢谢

end

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/1489431.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

蓝牙耳机百元之内怎么选?四款百元精品爆款蓝牙耳机盘点

在蓝牙耳机的海洋中&#xff0c;百元价位仿佛是一片神秘的绿洲&#xff0c;既诱人又充满未知&#xff0c;如何在众多选项中挑选出真正的精品呢&#xff1f;蓝牙耳机百元之内怎么选&#xff1f;这是许多消费者的共同疑问&#xff0c;带着这个疑问&#xff0c;作为蓝牙耳机发烧党…

2024101读书笔记|《飞花令·冬》——三冬雪压千年树,四月花繁百尺藤

2024101读书笔记|《飞花令冬》——三冬雪压千年树&#xff0c;四月花繁百尺藤 《飞花令冬&#xff08;中国文化古典诗词品鉴&#xff09;》素心落雪 编著&#xff0c;飞花令得名于唐代诗人韩翃《寒食》中的名句“春城无处不飞花”&#xff0c;类似于行酒令&#xff0c;是文人们…

在Mac上恢复永久删除的Excel文件,有效方法学习!

丢失 Mac 上的重要 Excel 文件可能是一场噩梦&#xff0c;尤其是如果它们被永久删除的话。相信我&#xff0c;这种感觉是没人愿意经历的。但不要惊慌&#xff1b;您可以选择恢复这些文件。无论是通过垃圾箱删除还是由于系统错误意外丢失&#xff0c;都有多种方法可以恢复您的数…

STM32嵌入式人工智能边缘计算应用教程

目录 引言环境准备边缘计算系统基础代码实现&#xff1a;实现嵌入式人工智能边缘计算系统 4.1 数据采集模块 4.2 数据处理与推理模块 4.3 通信与网络系统实现 4.4 用户界面与数据可视化应用场景&#xff1a;边缘计算与优化问题解决方案与优化收尾与总结 1. 引言 嵌入式人工智…

深度学习的前沿主题:GANs、自监督学习和Transformer模型

&#x1f48e; 欢迎大家互三&#xff1a;2的n次方_ &#x1f48e;1. 介绍 深度学习在人工智能领域中占据了重要地位&#xff0c;特别是生成对抗网络&#xff08;GANs&#xff09;、自监督学习和Transformer模型的出现&#xff0c;推动了图像生成、自然语言处理等多个领域的创…

Docker Desktop安装(通俗易懂)

1、官网 https://www.docker.com/products/docker-desktop/ 2、阿里云镜像 docker-toolbox-windows-docker-for-windows安装包下载_开源镜像站-阿里云 1. 双击安装文件勾选选项 意思就是&#xff1a; Use WSL 2 instead of Hyper-V (recommended) : 启用虚拟化&#xff0c;…

2024年【非高危行业生产经营单位主要负责人解析

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 非高危行业生产经营单位主要负责人及安全管理人员安全生产知识和管理能力考试报名是安全生产模拟考试一点通生成的&#xff0c;非高危行业生产经营单位主要负责人及安全管理人员安全生产知识和管理能力证模拟考试题库…

基于DMASM镜像的DMDSC共享存储集群部署

DMv8镜像模式共享存储集群部署 环境说明 操作系统&#xff1a;centos7.6 服务器&#xff1a;2台虚拟机 达梦数据库版本&#xff1a;达梦V8 安装前准备工作 参考文档《DM8共享存储集群》-第11、12章节 参考文档《DM8_Linux服务脚本使用手册》 1、系统环境(all nodes) 1…

Go-Zero 数据库实战:配置、建模与业务逻辑一体化

前言 在之前的几篇文章中&#xff0c;我们深入学习了Go-Zero框架的实战应用&#xff0c;包括模板定制化、API定义、抽奖算法设计等内容。本文将继续探索Go-Zero框架的实践技巧&#xff0c;并介绍一些与数据库操作相关的主题。 在现代应用程序开发中&#xff0c;对数据库的操作…

matlab仿真 数字基带传输(上)

&#xff08;内容源自详解MATLAB&#xff0f;SIMULINK 通信系统建模与仿真 刘学勇编著第六章内容&#xff0c;有兴趣的读者请阅读原书&#xff09; clear all nsamp10;%每个脉冲信号的抽样点数 s0ones(1,nsamp);%基带脉冲信号&#xff0c;其中s0的信号为1,1,1,1,1,1,1,1,1,1 …

【笔记】缺少DLL文件 Cannot import dll:C\Users\xxx\...\madd.dll

报错 原因 杀毒软件拦截了程序解决&#xff1a;关闭该软件 &#xff08;1&#xff09;电脑右下角&#xff08;↑&#xff09;&#xff0c;找到杀毒软件&#xff08;我电脑是 联想杀毒Plus&#xff09; &#xff08;2&#xff09;找到 “更改设置” - 选择 “实时扫描” &#…

vue3 使用Mock

官网: http://mockjs.com/ 安装 npm install mockjs -Dsteps1: main.js 文件引入 import /api/mock.jssteps2: src/api/mock.js import Mock from mockjs import homeApi from ./mockData/home /*** 1.拦截的路径:mock拦截了正常NetWork/网络请求,数据正常响应* 2.方法* …

【计算机网络】DHCP实验

一&#xff1a;实验目的 1&#xff1a;深入理解DHCP&#xff08;动态主机配置协议&#xff09;的工作原理和数据包交换过程。 2&#xff1a;掌握如何通过命令行释放和重新获取IP地址&#xff0c;并通过抓包软件分析DHCP消息的具体内容。 二&#xff1a;实验仪器设备及软件 硬…

猫头虎 分享已解决Error || pip install 出现 error: subprocess-exited-with-error 错误的解决办法

&#x1f42f; 猫头虎 分享已解决Error || pip install 出现 error: subprocess-exited-with-error 错误的解决办法 &#x1f680; 摘要 &#x1f31f; 在人工智能领域开发中&#xff0c;我们常常需要使用不同的包管理工具来管理我们的开发环境。作为技术博主猫头虎&#xff…

C++——QT:保姆级教程,从下载到安装到用QT写出第一个程序

登录官网&#xff0c;在官网选择合适的qt版本进行下载 这里选择5.12.9版本 点击exe文件下载&#xff0c;因为服务器在国外&#xff0c;国内不支持&#xff0c;所以可以从我的网盘下载 链接: https://pan.baidu.com/s/1XMILFS1uHTenH3mH_VlPLw 提取码: 1567 --来自百度网盘超级…

【Node.js入门精要】从零开始的开发之旅

说明文档&#xff1a;Node.js 教程_w3cschool 概念 Node.js 是一个开源、跨平台的 JavaScript 运行时环境&#xff0c;基于 Chrome 的 V8 引擎构建&#xff0c;专为构建高性能和可扩展的网络应用程序而设计的服务端语言。它采用事件驱动、非阻塞 I/O 模型&#xff0c;能够处理大…

气膜拳击馆:未来拳击场馆的最佳选择—轻空间

在现代城市化进程中&#xff0c;体育场馆的建设越来越受到关注。传统建筑成本高、施工周期长&#xff0c;并且在环境控制和节能环保方面存在诸多限制。而气膜建筑作为一种新型建筑形式&#xff0c;以其独特的优势和高性价比&#xff0c;逐渐成为各类体育场馆建设的最佳选择。今…

1. 设计原则 C++

1. 设计原则 C++ 1.1 依赖倒置原则(DIP) 高层模块(稳定)不应该依赖于低层模块(变化),两者都应该依赖于抽象(稳定)。如果一个稳定的依赖于一个会变化的(不稳定的),可想而知,也会变得不稳定。 这种就是违背 DIP 。好的设计应该下面这样。 抽象(稳定)不应该依赖…

AI跟踪报道第49期-新加坡内哥谈技术-本周AI新闻: 开源AI王者归来的一周

每周跟踪AI热点新闻动向和震撼发展 想要探索生成式人工智能的前沿进展吗&#xff1f;订阅我们的简报&#xff0c;深入解析最新的技术突破、实际应用案例和未来的趋势。与全球数同行一同&#xff0c;从行业内部的深度分析和实用指南中受益。不要错过这个机会&#xff0c;成为AI领…

《程序猿入职必会(6) · 返回结果统一封装》

&#x1f4e2; 大家好&#xff0c;我是 【战神刘玉栋】&#xff0c;有10多年的研发经验&#xff0c;致力于前后端技术栈的知识沉淀和传播。 &#x1f497; &#x1f33b; CSDN入驻不久&#xff0c;希望大家多多支持&#xff0c;后续会继续提升文章质量&#xff0c;绝不滥竽充数…