Commit 322b87d9 authored by gejun's avatar gejun

Fix incorrect 'return -1' according to pr287

parent b1fb5772
...@@ -113,7 +113,7 @@ bool TaskGroup::wait_task(bthread_t* tid) { ...@@ -113,7 +113,7 @@ bool TaskGroup::wait_task(bthread_t* tid) {
do { do {
#ifndef BTHREAD_DONT_SAVE_PARKING_STATE #ifndef BTHREAD_DONT_SAVE_PARKING_STATE
if (_last_pl_state.stopped()) { if (_last_pl_state.stopped()) {
return -1; return false;
} }
_pl->wait(_last_pl_state); _pl->wait(_last_pl_state);
if (steal_task(tid)) { if (steal_task(tid)) {
...@@ -122,7 +122,7 @@ bool TaskGroup::wait_task(bthread_t* tid) { ...@@ -122,7 +122,7 @@ bool TaskGroup::wait_task(bthread_t* tid) {
#else #else
const ParkingLot::State st = _pl->get_state(); const ParkingLot::State st = _pl->get_state();
if (st.stopped()) { if (st.stopped()) {
return -1; return false;
} }
if (steal_task(tid)) { if (steal_task(tid)) {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment