zoukankan      html  css  js  c++  java
  • RunLoop-Custom input source

    Creating

    Creating a custom input source involves defining the following:

    • The information you want your input source to process.
    • A scheduler routine to let interested clients know how to contact your input source.

    Signaling the Input Source

    • After it hands off its data to the input source, a client must signal the source and wake up its run loop.
    • Signaling the source lets the run loop know that the source is ready to be processed
    • you should always wake up the run loop explicitly

      tips

    • when the allotted time expires,the run loop call CFRunLoopSourceInvalidate to invalidate all the source0(at the same time invoke cancellation routine to inform the client)

    • CFRunLoopSourceInvalidate removes source from all the run loop modes in which it was registered.

  • 相关阅读:
    DNS原理入门
    软件架构入门
    熵:宇宙的终极规则
    新鲜事
    加密货币的本质
    汇编语言入门教程
    HTML & CSS
    [模板] 矩阵快速幂
    [模板] 三分
    [模板] 2-SAT 问题
  • 原文地址:https://www.cnblogs.com/rainySue/p/RunLoopCustom-input-source.html
Copyright © 2011-2022 走看看