alibaba / alibaba/async_simple

optimize lazy collectAll implement

Open
#125 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.2k
Forks
316
Avg merge
1d 13h
Merged PRs (30d)
3

Description

### Search before asking

- [ ] I searched the [issues](https://github.com/alibaba/async_simple/issues) and found no similar issues.

### What happened + What you expected to happen

https://github.com/alibaba/async_simple/blob/ab70389831cb2b9be060fd66c913833c000843fc/async_simple/coro/Collect.h#L229

```c++
Lazy<> foo() {}

collectAll(foo().via(executor)) is equal to collectAllPara(foo())
```

maybe we can use collectAll(foo().via(executor)) to simplify the collectAllPara, for example: collectAllPara call collectAll(foo().via(executor)) directly

### Reproduction way

### Anything else

### Are you willing to submit a PR?

- [ ] Yes I am willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with async_simple/coro/Collect.h around line 229 and compare the behavior of collectAll(foo().via(executor)) with collectAllPara(foo()). Trace how collectAllPara currently delegates or schedules work. Done means the implementation is simplified as proposed without changing the observable collection behavior; the payload does not name a test file to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.