NSM: Process more than one message per wait cycle!
This commit is contained in:
parent
31f0d6b311
commit
d5ed4e8ada
|
@ -122,9 +122,10 @@ namespace NSM
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Client::check ( )
|
Client::check ( int timeout )
|
||||||
{
|
{
|
||||||
lo_server_recv_noblock( _server, 0 );
|
if ( lo_server_wait( _server, timeout ) )
|
||||||
|
while ( lo_server_recv_noblock( _server, 0 ) ) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace NSM
|
||||||
int init_thread ( void );
|
int init_thread ( void );
|
||||||
|
|
||||||
/* call this periodically to check for new messages */
|
/* call this periodically to check for new messages */
|
||||||
void check ( void );
|
void check ( int timeout = 0 );
|
||||||
|
|
||||||
/* or call these to start and stop a thread (must do your own locking in handler!) */
|
/* or call these to start and stop a thread (must do your own locking in handler!) */
|
||||||
void start ( void );
|
void start ( void );
|
||||||
|
|
Loading…
Reference in New Issue