zoukankan      html  css  js  c++  java
  • MessageQueue 相关概念

    /**
     * Implements a thread-local storage, that is, a variable for which each thread
     * has its own value. All threads share the same {
    @code ThreadLocal} object,
     * but each sees a different value when accessing it, and changes made by one
     * thread do not affect the other threads. The implementation supports
     * {
    @code null} values.
     *
     *
    @see java.lang.Thread
     *
    @author Bob Lee
     */
    public class ThreadLocal<T>

    /**
      * Class used to run a message loop for a thread.  Threads by default do
      * not have a message loop associated with them; to create one, call
      * {
    @link #prepare} in the thread that is to run the loop, and then
      * {
    @link #loop} to have it process messages until the loop is stopped.

    public final class Looper 

    /**
     *
     * Defines a message containing a description and arbitrary data object that can be
     * sent to a {
    @link Handler}.  This object contains two extra int fields and an
     * extra object field that allow you to not do allocations in many cases. 
     *
     *
    While the constructor of Message is public, the best way to get
     * one of these is to call {
    @link #obtain Message.obtain()} or one of the
     * {
    @link Handler#obtainMessage Handler.obtainMessage()} methods, which will pull
     * them from a pool of recycled objects.
    </p>
     */
    public final class Message implements Parcelable

    /**
     * Low-level class holding the list of messages to be dispatched by a
     * {
    @link Looper}.  Messages are not added directly to a MessageQueue,
     * but rather through {
    @link Handler} objects associated with the Looper.
     *
     *
    <p>You can retrieve the MessageQueue for the current thread with
     * {
    @link Looper#myQueue() Looper.myQueue()}.
     */
    public final class MessageQueue

    /**
     * A Handler allows you to send and process {
    @link Message} and Runnable
     * objects associated with a thread's {
    @link MessageQueue}.  Each Handler
     * instance is associated with a single thread and that thread's message
     * queue.  When you create a new Handler, it is bound to the thread /
     * message queue of the thread that is creating it -- from that point on,
     * it will deliver messages and runnables to that message queue and execute
     * them as they come out of the message queue.

    public class Handler

  • 相关阅读:
    红帽7 创建网络会话
    红帽7 Iptables与Firewalld防火墙
    红帽7 配置网卡
    红帽7 LVM逻辑卷管理器
    红帽7 RAID磁盘冗余阵列
    红帽7 磁盘划分
    wpf学习一(转)
    选中当前点击的位置
    c#客显
    两个程序间的通信有三种
  • 原文地址:https://www.cnblogs.com/feng9exe/p/5726051.html
Copyright © 2011-2022 走看看