spring @async and JMM

时间:2016-05-06 18:16:18

标签: spring asynchronous

What guarantees (or not) does spring @async give w.r.t. cross-thread object consistency? The practical part of this question is - do all parameters passed to methods marked with @async need to be immutable?

From the JMM perspective - does the @Async implementation provide a 'happens-before' relationship between the different threads? (i.e. don't worry - everything just works).

Here's a similar post and answer: is spring async pass object thread safe to previous update

0 个答案:

没有答案