Skip to content

去除EventBus中事件发布的wait参数,需要非阻塞时应该在handler中处理 #208

Description

@gmf520

您的功能请求与现有问题有关吗?请描述

  • EventBus中Publish的wait参数是用于非阻塞处理需求的
  • 非阻塞处理应该在handler中实现,而不是需要在publish中决定

描述您想要的解决方案

去除wait参数及相关实现

···

    /// 
    /// 同步发布指定事件
    /// 
    /// 事件数据类型
    /// 事件数据
    /*/// 是否等待结果返回*/
    void Publish(TEventData eventData/*, bool wait = true*/) where TEventData : IEventData;

    /// 
    /// 同步发布指定事件,并指定事件源
    /// 
    /// 事件数据类型
    /// 事件源,触发事件的对象
    /// 事件数据
            /*/// 是否等待结果返回*/
    void Publish(object eventSource, TEventData eventData/*, bool wait = true*/) where TEventData : IEventData;

    /// 
    /// 同步发布指定事件
    /// 
    /// 事件数据类型
    /// 事件数据
            /*/// 是否等待结果返回*/
    void Publish(Type eventType, IEventData eventData/*, bool wait = true*/);

    /// 
    /// 同步发布指定事件,并指定事件源
    /// 
    /// 事件数据类型
    /// 事件源,触发事件的对象
    /// 事件数据
    /*/// 是否等待结果返回*/
    void Publish(Type eventType, object eventSource, IEventData eventData/*, bool wait = true*/);

···

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaked Changes ⚡更新有破坏性,对现有业务实现有较大影响Feature 🔨新功能,新特性Finished ✔️实现并完工

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions