Skip navigation.
Home
The QNX Community Portal

View topic - unblock msgsendv

unblock msgsendv

anything that doesn't fit to other groups.

unblock msgsendv

Postby terryd » Fri Oct 01, 2010 8:00 pm

Hi,
I have a multi-threaded app, with sender and receiver threads. Sender does name_open and then blocks in msgsendv. Receiver
does name_attach, but has not yet done msgreceive.

Problem happens when I try to shutdown the sender thread. Main
thread calls ConnectDetach with the coid of name_open, but msgsendv
doesn't unblock.

According to the docs, ConnectDetach should unblock all threads waiting
in MsgSendv. What am I doing wrong? Thanks.
terryd
New Member
 
Posts: 5
Joined: Wed Feb 24, 2010 9:18 pm

RE: unblock msgsendv

Postby mario » Fri Oct 01, 2010 9:06 pm

Yes but not when the connection is done with name_open ( I think ) . I'm actually surprise name_open returned if the received has done any msgreceive, because when using name_open extra messages are sent to the server ( through gns ).
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: unblock msgsendv

Postby terryd » Sun Oct 03, 2010 6:28 pm

I tried replacing name_attach/name_open with ChannelCreate/ConnectAttach - same result.

A possible solution might be for main thread to call ConnectServerInfo, get the chid for the channel,
and then do a MsgReceive (kind of a round-about method, but it might work).
terryd
New Member
 
Posts: 5
Joined: Wed Feb 24, 2010 9:18 pm

RE: unblock msgsendv

Postby mario » Tue Oct 05, 2010 11:53 am

I don`t recall but I beleive you need certain flags to be there ( or not be there ) when you do the ChannelCreate. I remember I had to do some digging, that was a while back ;-)
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to General Programming

Who is online

Users browsing this forum: Google [Bot] and 2 guests