Xuanwo commented on code in PR #3599:
URL:
https://github.com/apache/incubator-opendal/pull/3599#discussion_r1402941581
##########
core/src/types/list.rs:
##########
@@ -45,10 +44,20 @@ pub struct Lister {
/// required_metakey is the metakey required by users.
required_metakey: FlagSet<Metakey>,
- stating: Option<StatFuture>,
+ /// listing is used to indicate whether we are listing entries or stat
entries.
+ listing: bool,
+ /// task_queue is used to store tasks that are run in concurrent.
+ task_queue: VecDeque<StatTask>,
errored: bool,
}
+enum StatTask {
+ /// Handle is used to store the join handle of spawned task.
+ Handle(JoinHandle<(String, Result<RpStat>)>),
+ /// KnownEntry is used to store the entry that already contains the
required metakey.
+ KnownEntry(Box<Option<(String, Metadata)>>),
Review Comment:
That makes sense. Although I believe avoiding a box here is more important,
I lack the evidence to back up this idea. Let's keep things as they are for
now; we can enhance this section later.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]