摘要: 线程的本质其实为CPU准备好的数据结构,包含任务的上下文,c#的await是cpu回收线程了,然后等执行完毕后,后续的代码会重新分配线程执行 阅读全文
posted @ 2022-10-25 15:38 heisse 阅读(57) 评论(0) 推荐(0)
摘要: 需要在项目.csprog文件中显式添加 <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp2.1</TargetFramework> <L 阅读全文
posted @ 2022-10-25 11:39 heisse 阅读(72) 评论(0) 推荐(0)
摘要: class Solution2 { public: const static inline vector<int> dirs = {-1, 0, 1, 0, -1}; int shortestBridge(vector<vector<int>>& grid) { int n = grid.size( 阅读全文
posted @ 2022-10-25 10:31 heisse 阅读(20) 评论(0) 推荐(0)