全部搜索项
bullseye  ] [  bookworm  ] [  trixie  ] [  sid  ]
[ 源代码: libevent-distributor-perl  ]

软件包:libevent-distributor-perl(0.05-2)

libevent-distributor-perl 的相关链接

Screenshot

Debian 的资源:

下载源码包 libevent-distributor-perl

维护小组:

外部的资源:

相似软件包:

simple in-process pub/sub mechanism

Instances of this class provide a simple publish/subscribe mechanism within a single process, for either synchronous or Future-based asynchronous use.

A given instance has a set of named events. Subscribers are CODE references attached to a named event. Publishers can declare the existence of a named event, and then later invoke it by passing in arguments, which are distributed to all of the subscribers of that named event.

It is specifically not an error to request to subscribe an event that has not yet been declared, in order to allow multiple modules of code to be loaded and subscribe events the others publish, without introducing loading order dependencies. An event only needs to be declared by the time it is fired.

Natively all of the events provided by the distributor are fully-asynchronous in nature. Each subscriber is expected to return a Future instance which will indicate its completion; the results of these are merged into a single future returned by the fire method itself. However, to support synchronous or semi-synchronous programs using it, both the observe and invoke methods also have a synchronous variant. Note however, that this module does not provide any kind of asynchronous detachment of synchronous functions; using the /subscribe_sync method to subscribe a long-running blocking function will cause the fire_* methods to block until that method returns. To achieve a truely-asynchronous experience the attached code will need to use some kind of asynchronous event system.

This description was automagically extracted from the module by dh-make-perl.

其他与 libevent-distributor-perl 有关的软件包

  • 依赖
  • 推荐
  • 建议
  • 增强

下载 libevent-distributor-perl

下载可用于所有硬件架构的
硬件架构 软件包大小 安装后大小 文件
all 20.9 kB48.0 kB [文件列表]