Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Dec 29, 2018
1 parent 07b396a commit 17fa9b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@
There will have two parts in this repo
* AsyncSignal class specially designed to distinguish async method.
* A compiler hacker processer that is able to generate async counterpart for each method in you Dubbo service interface.

## AsyncSignal
AsyncSignal is an optional convenient type provided to unify your service definitions.

Expand Down Expand Up @@ -30,3 +30,6 @@ Now, you can call the new method with the CompletableFuture signature directly o
## Compiler hacker processer
It should run at compile time, and overwrite each method in your service definition with an async equivalence.
I think we can try to realize it by referencing [lombok](https://projectlombok.org/).

# Conclude
The essential part is to overwrite a new async method. Another way would be to generate a new method with a different name, for example, `sayHiAsync`, then we can get rid of `AsyncSignal`. But there's an obvious flaw of this way, that is, all method level configurators and routers defined to `sayHi` will not take effect.

0 comments on commit 17fa9b2

Please sign in to comment.