| 1 |
Source: libevent-distributor-perl |
| 2 |
Maintainer: Debian Perl Group <[email protected]> |
| 3 |
Uploaders: Andrej Shadura <[email protected]> |
| 4 |
Section: perl |
| 5 |
Testsuite: autopkgtest-pkg-perl |
| 6 |
Priority: optional |
| 7 |
Build-Depends: debhelper-compat (= 13), |
| 8 |
libmodule-build-perl, |
| 9 |
perl |
| 10 |
Build-Depends-Indep: libfeature-compat-try-perl <!nocheck>, |
| 11 |
libfuture-perl <!nocheck>, |
| 12 |
libtest-fatal-perl <!nocheck> |
| 13 |
Standards-Version: 4.6.0 |
| 14 |
Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libevent-distributor-perl |
| 15 |
Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libevent-distributor-perl.git |
| 16 |
Homepage: https://metacpan.org/release/Event-Distributor |
| 17 |
Rules-Requires-Root: no |
| 18 |
|
| 19 |
Package: libevent-distributor-perl |
| 20 |
Architecture: all |
| 21 |
Depends: ${misc:Depends}, |
| 22 |
${perl:Depends}, |
| 23 |
libfeature-compat-try-perl, |
| 24 |
libfuture-perl |
| 25 |
Description: simple in-process pub/sub mechanism |
| 26 |
Instances of the Event::Distributor class provide a simple publish/subscribe |
| 27 |
mechanism within a single process, for either synchronous or Future-based |
| 28 |
asynchronous use. |
| 29 |
. |
| 30 |
A given instance has a set of named events. Subscribers are CODE references |
| 31 |
attached to a named event. Publishers can declare the existence of a named |
| 32 |
event, and then later invoke it by passing in arguments, which are |
| 33 |
distributed to all of the subscribers of that named event. |
| 34 |
. |
| 35 |
It is specifically not an error to request to subscribe an event that has not |
| 36 |
yet been declared, in order to allow multiple modules of code to be loaded |
| 37 |
and subscribe events the others publish, without introducing loading order |
| 38 |
dependencies. An event only needs to be declared by the time it is fired. |
| 39 |
. |
| 40 |
Natively all of the events provided by the distributor are fully-asynchronous |
| 41 |
in nature. Each subscriber is expected to return a Future instance which will |
| 42 |
indicate its completion; the results of these are merged into a single future |
| 43 |
returned by the fire method itself. However, to support synchronous or |
| 44 |
semi-synchronous programs using it, both the observe and invoke methods also |
| 45 |
have a synchronous variant. Note however, that this module does not provide |
| 46 |
any kind of asynchronous detachment of synchronous functions; using the |
| 47 |
/subscribe_sync method to subscribe a long-running blocking function will |
| 48 |
cause the fire_* methods to block until that method returns. To achieve a |
| 49 |
truely-asynchronous experience the attached code will need to use some kind |
| 50 |
of asynchronous event system. |