• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.4 library(broadcast): Broadcast and receive event notifications
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(broadcast): Broadcast and receive event notifications
          • broadcast/1
          • broadcast_request/1
          • listen/2
          • listen/3
          • unlisten/1
          • unlisten/2
          • unlisten/3
          • listening/3
    • Packages
Availability::- use_module(library(broadcast)).(can be autoloaded)
Sourcebroadcast_request(+Term)
Unlike broadcast/1, this predicate stops if an associated goal succeeds. Backtracking causes it to try other listeners. A broadcast request is used to fetch information without knowing the identity of the agent providing it. C.f. ``Is there someone who knows the age of John?'' could be asked using
        ...,
        broadcast_request(age_of('John', Age)),

If there is an agent (listener) that registered an `age-of' service and knows about the age of `John' this question will be answered.

ClioPatria (version V3.1.1-21-gb8003bb)