mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine
This commit is contained in:
parent
bafdd83122
commit
2317f0e767
1 changed files with 6 additions and 8 deletions
|
@ -198,13 +198,7 @@ bool SrsQueueRecvThread::can_handle()
|
||||||
// for the message may cause the thread to stop,
|
// for the message may cause the thread to stop,
|
||||||
// when stop, the thread is freed, so the messages
|
// when stop, the thread is freed, so the messages
|
||||||
// are dropped.
|
// are dropped.
|
||||||
bool e = empty();
|
return empty();
|
||||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
|
||||||
if (_consumer && !e) {
|
|
||||||
_consumer->on_dispose();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
|
int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
|
||||||
|
@ -212,7 +206,11 @@ int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
|
||||||
// put into queue, the send thread will get and process it,
|
// put into queue, the send thread will get and process it,
|
||||||
// @see SrsRtmpConn::process_play_control_msg
|
// @see SrsRtmpConn::process_play_control_msg
|
||||||
queue.push_back(msg);
|
queue.push_back(msg);
|
||||||
|
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||||
|
if (_consumer) {
|
||||||
|
_consumer->on_dispose();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue