Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

78 lines (37 sloc) 1.979 kb

Module gproc_monitor

This module implements a notification system for gproc names When a process subscribes to notifications for a given name, a message will be sent each time that name is registered.

Behaviours: gen_server.

Authors: Ulf Wiger (ulf.wiger@feuerlabs.com).

Function Index

start_link/0 Starts the server.
subscribe/1 Subscribe to registration events for a certain name.
unsubscribe/1 Unsubscribe from registration events for a certain name.

Function Details

start_link/0

start_link() -> {ok, Pid} | ignore | {error, Error}



Starts the server

subscribe/1

subscribe(Key::key()) -> ok



Subscribe to registration events for a certain name

The subscribing process will receive a {gproc_monitor, Name, Pid} message whenever a process registers under the given name, and a {gproc_monitor, Name, undefined} message when the name is unregistered, either explicitly, or because the registered process dies.

When the subscription is first ordered, one of the above messages will be sent immediately, indicating the current status of the name.

unsubscribe/1

unsubscribe(Key::key()) -> ok



Unsubscribe from registration events for a certain name

This function is the reverse of subscribe/1. It removes the subscription.

Jump to Line
Something went wrong with that request. Please try again.