apache / groovy-website

Apache Groovy content to generate sites
Apache License 2.0
37 stars 61 forks source link

gpars-meets-virtual-threads blog code errors #47

Closed namuller30 closed 5 months ago

namuller30 commented 5 months ago

I was trying to implement the code in the gpars-meets-virtual-threads article and noticed it doesn't work.

The problem is you need to use the GParsExecutorsPool.withExistingPool instead of GParsPool.withPool that is listed

paulk-asert commented 5 months ago

GParsPool.withPool is used for the first example to show GPars using normal threads. The withExistingPool method is indeed in the GParsExecutorsPool class. It is assumed that folks would find it without too much trouble but you are right it could be clearer to explicitly mention that.

paulk-asert commented 5 months ago

Clarified. Thanks for the suggestion.