Skip to content

Fix early return in QCoro::waitFor#46

Merged
danvratil merged 1 commit intoqcoro:mainfrom
rgriebl:pr3
Jan 26, 2022
Merged

Fix early return in QCoro::waitFor#46
danvratil merged 1 commit intoqcoro:mainfrom
rgriebl:pr3

Conversation

@rgriebl
Copy link

@rgriebl rgriebl commented Jan 26, 2022

Calling exit() on a QEventLoop that hasn't even started does nothing:
it will also not prevent it from being started on exec().

@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2022

Unit Test Results

  6 files   -   1    6 suites   - 1   2m 42s ⏱️ - 50m 19s
13 tests ±  0  13 ✔️ +1  0 💤 ±0  0  - 1 
74 runs   - 11  74 ✔️  - 9  0 💤 ±0  0  - 2 

Results for commit 472d482. ± Comparison against base commit 8d61ace.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@danvratil danvratil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you!

Would you mind adding a testcase for QCoro::waitFor() with an early-return coroutine to tests/task.cpp? There are already some testWaitFor* functions, so just add a variation with an already-finished coroutine, please.

Calling exit() on a QEventLoop that hasn't even started does nothing:
it will also not prevent it from being started on exec().
@danvratil
Copy link
Collaborator

Awesome, thank you!

@danvratil danvratil merged commit ccc80e6 into qcoro:main Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants