大家好!
我有一个HTTP POST请求线程,它从队列中弹出,并将其内容发布到服务器。我注意到我的队列很快就满了,我开始丢失要发送的数据包,或者增加了等待时间。增加队列大小对延迟部分不起作用,这取决于发送线程能够处理消息的速度。我能创建多个线程来进行HTTP POST请求吗?这是个好主意还是我应该加快我现有线程的速度?
我的另一个问题是如何停止永远的观察。用0作为函数的一个参数使之进入永远扫描模式,我怎样才能停止它呢?
以上来自于百度翻译
以下为原文
Hello All!
I have a http post request thread that pops from a queue and posts its contents to a server. I no
tice that my queue gets full pretty quickly and I start losing the packets to be sent, or have increased latency. Increasing my queue size will not help with the latency part as that depends on how quickly the send thread is able to process the message. Can I create multiple threads that make the HTTP post request? Is that a good idea or should I look at speeding up my existing thread?
Another question I had is how to disable forever ble_observe. Using 0 as an argument to the function puts it into forever scan mode, how can I stop it?