MsgReceive() doesn't receive pending pulses

how to get all pulses from queue ?
how to get number of pulses waiting in queue ?

MsgReceive() receive only one pulse
and then goes into blocked-state
(even if there are some pulses in receive queue!)

If there are pulses in the queue, MsgReceive should not block. Something must be wrong in your program.

I don’t know how to get the number of outstanding pulses.

Number of outstanding pulses is that you should know :slight_smile: - how many have sent, so much and is!
If you want to know num of outstanding pulses, then you program need to rewrite.

I was sending some pulses before ChannelCreate() & ConnectAttach().
(and these pulses were in that ‘strange’ queue)
heh - I’ve found MsgReceive() micro-bug :slight_smile:

If you send a letter by throwing it out the window will you say there is a problem with postal services? lol!

How you sending your pulse? MsgSendPulse() ? Did you check the return value of that function?

Sending pulse, need a connection id (coid). If you did it BEFORE ConnectAttach(), then it depends on what “coid” is at that time.

If it is a random value, your MsgSendPulse() should return an error, telling you there is no such connection exist.

If your coid is happened to be 0 at the time, then the pulse is sent to the manager who is pointed by fd = 0 (stdin), which, I would guess devc-con or devc-pty; Depends on credential, your MsgSendPulse() may just failed, cause you don’t have permission to send pulse to them; Or, you may success, but these managers would just throw away the pulse cause they don’t know what your are talking about…

ok, so why msgreceive received pulses sent to nowhere ? :slight_smile:

Post code.

oops, you’re right (& I was too fast). I can’t send pulse nowhere.