MCPcopy Create free account
hub / github.com/LMMS/lmms / receiveMessage

Method receiveMessage

include/RemotePlugin.h:1090–1115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1088
1089
1090RemotePluginBase::message RemotePluginBase::receiveMessage()
1091{
1092#ifdef SYNC_WITH_SHM_FIFO
1093 m_in->waitForMessage();
1094 m_in->lock();
1095 message m;
1096 m.id = m_in->readInt();
1097 const int s = m_in->readInt();
1098 for( int i = 0; i < s; ++i )
1099 {
1100 m.data.push_back( m_in->readString() );
1101 }
1102 m_in->unlock();
1103#else
1104 pthread_mutex_lock( &m_receiveMutex );
1105 message m;
1106 m.id = readInt();
1107 const int s = readInt();
1108 for( int i = 0; i < s; ++i )
1109 {
1110 m.data.push_back( readString() );
1111 }
1112 pthread_mutex_unlock( &m_receiveMutex );
1113#endif
1114 return m;
1115}
1116
1117
1118

Callers 1

processingThreadMethod · 0.80

Calls 7

readIntFunction · 0.85
readStringFunction · 0.85
readStringMethod · 0.80
waitForMessageMethod · 0.45
lockMethod · 0.45
readIntMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected