增加异步事件支持

This commit is contained in:
zhou-hao
2020-07-20 18:05:56 +08:00
parent ee50a4f4ec
commit e857247d45

View File

@@ -0,0 +1,16 @@
package org.hswebframework.web.event;
import lombok.Getter;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Mono;
@Getter
public class AsyncEvent {
private Mono<Void> async = Mono.empty();
public synchronized void async(Publisher<?> publisher) {
this.async = async.then(Mono.from(publisher).then());
}
}