C#中异步和多线程的区别介绍

  Thread Id of Main() is: 1, current thread is not thread pool thread.

  Thread Id of Foo() is: 3, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 3, current thread is thread pool thread.

  Thread Id of Foo() is: 3, current thread is thread pool thread.

  Thread Id of Foo() is: 4, current thread is thread pool thread.

  Thread Id of Foo() is: 5, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 3, current thread is thread pool thread.

  Thread Id of Foo() is: 3, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 4, current thread is thread pool thread.

  Thread Id of Foo() is: 4, current thread is thread pool thread.

  Thread Id of Foo() is: 6, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 5, current thread is thread pool thread.

  Thread Id of Foo() is: 5, current thread is thread pool thread.

  Thread Id of Foo() is: 7, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 3, current thread is thread pool thread.

  Thread Id of Foo() is: 3, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 4, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 6, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 5, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 7, current thread is thread pool thread.

  Thread Id of FooCallBack() is: 3, current thread is thread pool thread.