뭔가 빠져 나오지 않습니다. 무슨 일이 일어나고 있는지의 간단한 예 :Grails, GPars 및 데이터 지속성
def testDemo() {
def person = new Person(...)
person.save(flush: true)
println "Number of people after save: " + Person.all.size()
def dummyList = [1, 2, 3, 4, 5]
GParsPool.withPool { num ->
println "Number of people after withPool: " + Person.all.size()
dummyList.eachParallel {
println "Number of people after eachParallel " + Person.all.size()
Person.withTransaction {
...
이 출력 : I 데이터가 지속되거나이 버그가 있으면 만들 수 세션 및 트랜잭션 뭔가를해야 할 경우
Number of people after save: 1
Number of people after withPool: 1
Number of people after eachParallel: 0
는 이해가 안 돼요 GPars에 있습니다. 기본 절전 모드에서 여기서 무슨 일이 벌어지고 있습니까?
최근 작성한 Person을 병렬 종료 내에서 볼 수있게하고 싶습니다.
어떻게이 문제를 극복 했습니까? @Alison – Ramisetti