zoukankan      html  css  js  c++  java
  • 异步编程知识点记录

    INotifyPropertyChanged
    PropertyChangedEventHandler
    ObservableCollection
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data;
    using System.Data.Entity.ModelConfiguration;
    EntityTypeConfiguration

    DependencyProperty
    DependencyObject
    DispatcherTimer
    INotifyPropertyChanged

    对于委托的异步调用来说,其BeginInvoke函数无非包括以下内容,BeginInvoke(调用参数,回调函数,Object对象)
    AsyncState
    IsHandleCreated
    InvokeRequired、IsDisposed、IsHandleCreated
    AsyncCallback
    IAsyncResult
    ThreadPool.QueueUserWorkItem
     Thread类中的VolatileRead和VolatileWrite方法:
    Precidate
    IEnumerable
    回调方法
    //关于回调方法 ,无返回且带一个参数的委托 , 在异步完成后调用一次
    //由子线程调用,与主线无关
    //public delegate void AsyncCallback(IAsyncResult ar);
    AsyncCallback callback =
    r => Console.WriteLine("I'm CallBack,and{0}", r.AsyncState);//r.AsyncState = "haha"


    ParameterizedThreadStart
    Interlocked

    ParameterizedThreadStart委托是面向带参数方法的
    ThreadPool.QueueUserWorkItem(new WaitCallback(AsyncCallback),"Hello Wrold !");

    * 取消架构,在线程运行时取消当前运行的线程所有操作
    var cts = new CancellationTokenSource();
    Parallel
    ThreadPool.SetMaxThreads(10, 1);

    ThreadPool.QueueUserWorkItem(new WaitCallback(AsyncCallback1), state);

    static CancellationTokenSource tokenSource = new CancellationTokenSource();
    private CancellationToken token = tokenSource.Token;

    AutoResetEvent are = new AutoResetEvent(true);
    Monitor.Enter(syncObj);
    Monitor.Exit(syncObj);
    BeginInvoke
    InvokeRequired
    AutoResetEvent
    Barrier
    CountdownEvent
    ManualResetEventSlim
    Mutex
    ReaderWriterLockSlim
    SemaphoreSlim
    Dispatcher.BeginInvoke 方法 (Action)
    Task.Factory.StartNew
    Parallel.For
    Parallel.ForEach
    Parallel.Invoke
    ParallelLoopResult
    Parallel

  • 相关阅读:
    innerHTML使用方法
    HDU 1426 Sudoku Killer
    Junit使用教程(一)
    HLS协议实现
    GPIO
    TraceView总结
    在kettle中实现数据验证和检查
    用户向导左右滑动页面实现之ImageSwitcher
    DWZ使用笔记
    oracle进程
  • 原文地址:https://www.cnblogs.com/Jeely/p/10760805.html
Copyright © 2011-2022 走看看