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 9198107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:12:35+00:00 2026-06-17T22:12:35+00:00

I have two types of processes. I want process B to wait for a

  • 0

I have two types of processes.

I want process B to wait for a message from process A. Once A sends the message, process B should process the message and wait again.

Also, I will have multiple instances of process A and process B. So, all the B processes should send the messages to all A processes.

I was looking at something like signals, but with a string attached to it.

What is the best way to do this?

I know I can create a pipe and keep reading the pipe in a while, but it seems inneficient. Also, won’t it get removed from the pipe once read?

Note: None of the processes are subprocesses of each other.

  • 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-06-17T22:12:36+00:00Added an answer on June 17, 2026 at 10:12 pm

    This is what I ended up doing at last…

    Made the producer process into a module and imported it into the consumer. Thus, both the processes can share variables.

    Producer threads will keep producing and consumer threads will keep consuming. And I am using condition to synchronize the data, threading.Condition().

    Each Producer thread:

    • Acquire condition
    • Write data to a global variable
    • Call notifyAll()
    • Release condition

    Each Consumer thread:

    • Acquire condition
    • Wait for the condition
    • Read and process data in the global variable
    • Wait for the condition…

    This is just a high level view. In my case, I have different types of producer threads each producing different data and meant for a particular group of consumers. So, I have a list of condition.

    Reference on condition

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

Sidebar

Related Questions

I have two types of registration, registration A and registration B, each will have
I have two different list types. I need to remove the elements from list1
I have a process that will be called rather frequently from cron to read
I have two processes one will query other for data.There will be huge amount
I have two types of users for my system, normal human users with a
I have two types of data sets. Both are in same size. One contains
I have two types of users on the database: -Web registered users -Twitter users
If I have two types of strings as: const char *str1 = This is
So, I have two types at the moment: const unsigned char* unencrypted_data_char; string unencrypted_data;
I am developing a application to create chart. I have two types of Queries.

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.