# ITK 5.2 rc2 solved a multiprocessing issue - thanks!

**URL:** <https://discourse.itk.org/t/itk-5-2-rc2-solved-a-multiprocessing-issue-thanks/3882>\
**Category:** Community\
**Tags:** itk-releases, multiprocessing, python\
**Created:** [February 18, 2021, 5:38pm UTC](https://discourse.itk.org/t/itk-5-2-rc2-solved-a-multiprocessing-issue-thanks/3882 "2021-02-18T17:38:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jond01](https://discourse.itk.org/user_avatar/discourse.itk.org/jond01/32/1367_2.png) [@jond01](https://discourse.itk.org/u/jond01)\
**Post date:** [February 18, 2021, 5:38pm UTC](https://discourse.itk.org/t/itk-5-2-rc2-solved-a-multiprocessing-issue-thanks/3882/1 "2021-02-18T17:38:14Z")

</div>

I have just tested the release candidate for [version 5.2 of itk](https://discourse.itk.org/t/itk-5-2-release-candidate-2-available-for-testing/3867) and wanted to share with you that it solved a previous issue with multiprocessing (as promised in the release notes 🙂).  
Also, I did not encounter any problems with the new version, apart from minor modifications (which were also in the release notes), so thanks!

The code that did not work is:

```python
from multiprocessing.dummy import Pool

import itk
import numpy as np

n_imgs = 10
fnames = [f'img_{n}.nii' for n in range(n_imgs)] # a list of images
# Write the images - uncomment only once for writing the images
# list(map(lambda fname: itk.imwrite(itk.image_from_array(np.zeros((10, 10, 10), dtype=np.int16)), fname), fnames))

# Read images with threads (itk backend) - did not work before itk 5.2
pool = Pool(n_imgs)
pool.map(lambda fname: itk.imread(fname), fnames)
# The error reads:
# AttributeError: module 'ITKIOImageBase' has no attribute 'swig'

# Close the pool and wait for the work to finish
pool.close()
pool.join()

```

But with 5.2 the error is gone.

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [March 8, 2021, 6:28pm UTC](https://discourse.itk.org/t/itk-5-2-rc2-solved-a-multiprocessing-issue-thanks/3882/2 "2021-03-08T18:28:51Z")

</div>

@jond01 thanks for testing and the feedback! 🙏
