摘要:
class Program { // 使用BeginXXX/EndXXX和IAsyncResult对象的方式被称为异步编程模型(APM模式) delegate string RunOnThreadPool(out int threadId); static void Main(string[] ar 阅读全文
posted @ 2020-05-30 16:50
石shi
阅读(408)
评论(0)
推荐(0)
摘要:
暂停线程: static void Main(string[] args) { Thread thread = new Thread(Common.PrintNumbersWithDelay); thread.Start(); Common.PrintNumbers(); Console.ReadK 阅读全文
posted @ 2020-05-30 14:56
石shi
阅读(294)
评论(0)
推荐(0)
摘要:
原子操作类: public abstract class CounterBase { public abstract void Increase(); public abstract void Decrease(); } public class CounterNoInterlocked : Cou 阅读全文
posted @ 2020-05-30 14:41
石shi
阅读(311)
评论(0)
推荐(0)
摘要:
public static class SortingHelper<T> where T : IComparable { #region 1.1 直接插入排序 /// <summary> /// 普通版直接插入排序 /// </summary> /// <param name="arr">待排序数组 阅读全文
posted @ 2020-05-30 13:31
石shi
阅读(231)
评论(0)
推荐(0)