Xuanwo commented on code in PR #3514:
URL: 
https://github.com/apache/incubator-opendal/pull/3514#discussion_r1386115266


##########
core/src/types/operator/blocking_operator.rs:
##########
@@ -138,6 +138,13 @@ impl BlockingOperator {
     pub fn info(&self) -> OperatorInfo {
         OperatorInfo::new(self.accessor.info())
     }
+
+    /// Create a new non-blocking operator.
+    ///
+    /// This operation is nearly no cost.
+    pub fn non_blocking(&self) -> Operator {

Review Comment:
   Pleae don't touch core's API. We already have `impl From<BlockingOperator> 
for Operator`



##########
bindings/python/python/opendal/__init__.pyi:
##########
@@ -73,6 +73,8 @@ class AsyncOperator:
     async def copy(self, source: str, target: str): ...
     async def rename(self, source: str, target: str): ...
     async def remove_all(self, path: str): ...
+    @property
+    def operator(self) -> Operator: ...

Review Comment:
   How about adding the following API to make this API more clear on what it 
does?
   
   - `to_async_operator()` for `Operator` class
   - `to_operator` for `AsyncOperator` class



-- 
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]

Reply via email to