Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6848101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:49:36+00:00 2026-05-27T00:49:36+00:00

I have an OTP application with an event that happens periodically. There are several

  • 0

I have an OTP application with an event that happens periodically. There are several actors that want to do stuff in response to the event. The stuff each actor does is a function of its own state, but otherwise they’re identical.

My problem is with how I go about incorporating this setup into a supervision tree. I have a gen_event manager with each actor being an event handler. This would work well if it weren’t for the fact that gen_event supervision is weird. Once my first handler is add_sup_handler‘d the rest fail with already_started and my gen_server that’s acting as a supervisor for the event handlers dies.

So what should I do here? I’m starting to think I should just write my own event manager that can keep track of all my actors and their state.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:49:36+00:00Added an answer on May 27, 2026 at 12:49 am

    gen_event:add_handler/3:

    Handler is the name of the callback module Module or a tuple
    {Module,Id}, where Id is any term. The {Module,Id} representation
    makes it possible to identify a specific event handler when there are
    several event handlers using the same callback module.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a OTP application comprising a single supervisor supervising a small number of
Have a photography site that I want to prevent image copying from. How can
Can an OTP event manager process (e.g. a logger) have some state of its
I have an Erlang code file which is not an OTP application. I do
Is there anything for Python that has concurrency like Erlang does, particulary transparent actors
I have simple erlang module and I want to rewrite it based on OTP
I have written a simple erlang app using gen_server. When starting it with application:start(myapp),
I have been building a real-time notification system. It’s part of a web application,
I have an application to authenticate the user based on a one time password.
My question How do I generate OTP-like documentation for multiple applications? Explanation I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.