MsgReceive & Channel ID question
27/06/2017 10:46
Hi i have a main that creates 2 threads each thread uses MsgReceive to wait for a Pulse.

in the main i create a channel that i use.in both threads My question is , can i use the same channel as parameter in the MsgReceivefunctions used in both threads ?Or should i create a new channelid for each of my threads ? Johan (newbie)

Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
27/06/2017 10:46 - It depends.

The same channel can be used by both threads. BUT, you can't specify/targeta particular thread with a particular pulse. And, it shouldn't (normally)matter.

Usual structure of a server: /* setup *//* launch one or more threads into main-loop function */while( 1 ){ rcvid = MsgReceive() if ( ! rcvid ) { switch( pulse_code ) { case PULSE_TYPE_ONE case PULSE_TYPE_TWO ...

} } else { switch( msg_type ) { case MSG_TYPE_ONE case MSG_TYPE_TWO ...

} }} -David

Source is Usenet: comp.os.qnx
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below