Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fetchAll method #207

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Add fetchAll method #207

merged 1 commit into from
Jul 9, 2024

Conversation

Remscar
Copy link
Contributor

@Remscar Remscar commented Jul 9, 2024

Adds a new fetchAll public method.

fetchAll just calls fetch but will drain the async generator and return an array of results.

It appears users commonly hit the issue with this library where they are unable to make IMAP commands while using fetchAll not realizing that it causes a deadlock. Without the library automatically detecting misusage like this, time will be wasted by developers while they learn about this edge case. Unfortunately a single comment in some example code for the documentation of the .fetch function is not enough.

Having a .fetchAll method provides an easy to use interface for the library which will help new users and increase library adoption.

Related Issues:
#206
#159
#130
#110

@CLAassistant
Copy link

CLAassistant commented Jul 9, 2024

CLA assistant check
All committers have signed the CLA.

@postalsys postalsys deleted a comment from CLAassistant Jul 9, 2024
@andris9 andris9 merged commit bc09998 into postalsys:master Jul 9, 2024
3 checks passed
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.

3 participants