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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:20:52+00:00 2026-05-10T16:20:52+00:00

We have a vxWorks design which requires one task to process messages from two

  • 0

We have a vxWorks design which requires one task to process messages from two message queues, Q1 & Q2.

We would like to wait on both Queues and whichever gets a message, process the message from the queue.

We want to avoid either polling the queues or using a timeout value which could cause the other queue to fill up.

Is there a way to do this?

  • 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. 2026-05-10T16:20:53+00:00Added an answer on May 10, 2026 at 4:20 pm

    If you use named pipes (pipeDevCreate(), write(), read()) instead of message queues, you can use select() to block until there are messages in either pipe.

    Whenever select() triggers, you process all messages in the high priority pipe. Then you process a single message from the low priority pipe. Then call select again (loop).

    Example Code snippets:

     // Initialization: Create high and low priority named pipes  pipeDrv(); //initialize pipe driver  int fdHi = pipeDevCreate('/pipe/high',numMsgs,msgSize);  int fdLo = pipeDevCreate('/pipe/low',numMsgs,msgSize);   ...   // Message sending thread: Add messages to pipe  write(fdHi, buf, sizeof(buf));   ...   // Message processing Thread: select loop  fd_set rdFdSet;   while(1)  {      FD_ZERO(&rdFdSet);      FD_SET(fdHi, &rdFdSet);      FD_SET(fdLo, &rdFdSet;       if (select(FD_SETSIZE, &rdFdSet, NULL, NULL, NULL) != ERROR)      {          if (FD_ISSET(fdHi, &rdFdSet))          {              // process all high-priority messages              while(read(fdHi,buf,size) > 0)              {                  //process high-priority              }          }           if (FD_ISSET(fdLo, &rdFdSet))          {              // process a single low priority message              if (read(fdLo,buf,size) > 0)              {                  // process low priority              }          }      }  } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer ControlCollection only implements IEnumerable, not IEnumerable<T>. That's easy to fix… May 11, 2026 at 10:55 am
  • added an answer We developed exactly what you are looking for on an… May 11, 2026 at 10:55 am
  • added an answer Most if not all GUI toolkits have a resize event… May 11, 2026 at 10:55 am

Related Questions

We have a vxWorks design which requires one task to process messages from two
We have a requirement in project to store all the revisions(Change History) for the
We have a remoting singleton server running in a separate windows service (let's call
We have a Windows Server Web Edition 2003 Web Farm. What can we use
We have a situation where users are allowed to upload content, and then separately
We have a SharePoint list setup with history enabled so the Comments field keeps
We have a whole bunch of DLLs that give us access to our database
We have a service that has some settings that are supported only over net.tcp.
We have a few very large Excel workbooks (dozens of tabs, over a MB
We have a PHP project that we would like to version control. Right now

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.