uranusjr opened a new issue, #67683:
URL: https://github.com/apache/airflow/issues/67683

   Java doesn’t do coroutines, so the current `Client` implementation is sync. 
But Kotlin does, and we might benefit from a different async client. I think we 
can do it like this:
   
   1. Add an AsyncTask protocol that has an `suspend fun execute` instead of 
the sync execute function.
   2. Create an AsyncClient class to use instead of Client. `suspend fun 
execute(client: AsyncClient, context: Context)`.
   3. When the task is executed, check which protocol is used. Wrap 
`runBlocking` around the async task.
   4. Make the annotation processor detect `suspend fun` so the same 
`@Builder.Task` can be used on both sync and async and automatically does the 
right thing.
   
   The only question is whether we just add `Async` to both Task and Client. 
Should the sync version be renamed? (BlockingTask & BlockingClient?)


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