queues and things

U

User At

I currently have a deamon that reads a data from a serial port, and based
on certain data it sends out alert messages (sms,email,etc). The problem I
have is that sending alerts requires a bit of time (about 30 seconds), so
I use non-blocking queues which works fine. But, when a signal to
"terminate" is sent to the daemon, only the first entry in the alert queue
is completed before exit. Is there way to get all the items on the queue
to be executed before the exit?
 
E

Eddie Corns

I currently have a deamon that reads a data from a serial port, and based
on certain data it sends out alert messages (sms,email,etc). The problem I
have is that sending alerts requires a bit of time (about 30 seconds), so
I use non-blocking queues which works fine. But, when a signal to
"terminate" is sent to the daemon, only the first entry in the alert queue
is completed before exit. Is there way to get all the items on the queue
to be executed before the exit?

Put a "STOP" command on the queue.

Eddie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,285
Messages
2,571,416
Members
48,107
Latest member
AmeliaAmad

Latest Threads

Top