DengJin88 opened a new issue #1164:
URL: https://github.com/apache/incubator-brpc/issues/1164
Hi, we know that ExecutionQueue is worked as a batching mechanism,say we
sumbit some tasks and the "execute" runs in one bthread,after processing all
the tasks in "iter",it exits the bthread and wait for a next batch tasks,and
run again(and it allow t run the tasks "in place",while it still has a
"start-process-exit" lift cycle).
Nowdays,polling is popular in area such as intergrating with SPDK,I'd like
to write code like following,making the "execute" always looping in one
bthread(maybe this idea conflict with bthread design target:it won't do a long
runing task while not allow a re-scheduling?):
```
int execute(void *meta, bthread::IteratorTask<std::string> &iter) {
while (iter.is_queue_stopped() == false) {
for (;iter; ++iter) {
// submit IO task with spdk
}
// submition finished,and I'd like to polling spdk result
// spdk polling
}
return 0;
}
```
while in current ExecutionQueue implemetation,I have to start a another
bthread doing polling and send fake task to the ExecutionQueue to trigger SPDK
polling thing,is this the better way to use ExectionQueue?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]