Question: C++ and pulses

Hello,

I am working with some legacy code written in C++. In the constructor
of the class,

  1. a channel is created

  2. a sigevent struct is set up to send a pulse

  3. a repetitive interval timer is created

  4. the timer is armed

  5. a whole bunch of other activity is done that involves sending messages
    and receiving replies.

  6. Constructor finishes

Question: if the timer expires one or more times (and the pulse(s) is sent)
before the class constructor finishes, are there any bad side effects?

Regards, Vasili

William Halchin wrote:

Hello,

I am working with some legacy code written in C++. In the constructor
of the class,

  1. a channel is created

  2. a sigevent struct is set up to send a pulse

  3. a repetitive interval timer is created

  4. the timer is armed

  5. a whole bunch of other activity is done that involves sending messages
    and receiving replies.

  6. Constructor finishes

Question: if the timer expires one or more times (and the pulse(s) is sent)
before the class constructor finishes, are there any bad side effects?

Regards, Vasili

Other than having the pulses queued up, not really. The rest of your
code just needs to be aware that it’s possible there are pending timer
pulses already pending from startup.


Cheers,
Adam

QNX Software Systems
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>

What kind of a programmer puts all this stuff in the constructor? Qu’elle
numb-skull.

If this guy is so lazy as to not use C++ properly it is very likely he has
abused QNX’s architecture as well (i.e. he didn’t spend the necessary time
to figure out how to implement it correctly).

You might consider reviewing the design and requirements and restructure the
system and the way IPC is implemented. At least take a hard look at it and
seriously consider doing it.

You’ll get lots of help here if you need it.

Regards,
Kevin



“William Halchin” <bhalchin@syrres.com> wrote in message
news:d3jpst$li1$1@inn.qnx.com

Hello,

I am working with some legacy code written in C++. In the
constructor
of the class,

  1. a channel is created

  2. a sigevent struct is set up to send a pulse

  3. a repetitive interval timer is created

  4. the timer is armed

  5. a whole bunch of other activity is done that involves sending messages
    and receiving replies.

  6. Constructor finishes

Question: if the timer expires one or more times (and the pulse(s) is
sent)
before the class constructor finishes, are there any bad side effects?

Regards, Vasili

“Kevin Stallard” <kevin@airrilabs.net> wrote in message
news:d3keff$63t$1@inn.qnx.com

What kind of a programmer puts all this stuff in the constructor?
Qu’elle
numb-skull.

If this guy is so lazy as to not use C++ properly it is very likely he has
abused QNX’s architecture as well (i.e. he didn’t spend the necessary time
to figure out how to implement it correctly).
no comment ;^)

Vasya

You might consider reviewing the design and requirements and restructure
the
system and the way IPC is implemented. At least take a hard look at it
and
seriously consider doing it.

You’ll get lots of help here if you need it.

Regards,
Kevin



“William Halchin” <> bhalchin@syrres.com> > wrote in message
news:d3jpst$li1$> 1@inn.qnx.com> …
Hello,

I am working with some legacy code written in C++. In the
constructor
of the class,

  1. a channel is created

  2. a sigevent struct is set up to send a pulse

  3. a repetitive interval timer is created

  4. the timer is armed

  5. a whole bunch of other activity is done that involves sending messages
    and receiving replies.

  6. Constructor finishes

Question: if the timer expires one or more times (and the pulse(s) is
sent)
before the class constructor finishes, are there any bad side effects?

Regards, Vasili
\