# Parallel Problem in Activiz

**URL:** https://discourse.vtk.org/t/parallel-problem-in-activiz/15478
**Category:** Development
**Tags:** code
**Created:** [April 6, 2025, 3:30am UTC](https://discourse.vtk.org/t/parallel-problem-in-activiz/15478 "2025-04-06T03:30:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![INCREADIBLE](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/i/c68b51/32.png) [@INCREADIBLE](https://discourse.vtk.org/u/INCREADIBLE)
#### Post date: [April 6, 2025, 3:30am UTC](https://discourse.vtk.org/t/parallel-problem-in-activiz/15478/1 "2025-04-06T03:30:23Z")

</div>

i am using the activiz 9.4, and i want to use a Parallel.For to create multi vtkCell in the same time,the code like this :

```csharp
        Parallel.For(0, input.GetNumberOfCells(), i =>
        {
            var temp = vtkCell.New();
        });

```

input is a vtkPolyData, it throw a “error: IndexedConstructors table already has a non-null entry at mteIndex 18”. But if i use vtkPolyData:

```charp
        Parallel.For(0, input.GetNumberOfCells(), i =>
        {
            var temp = vtkPolyData.New();
        });

```

it works. Is it a bug or a feature?

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [April 7, 2025, 7:04am UTC](https://discourse.vtk.org/t/parallel-problem-in-activiz/15478/2 "2025-04-07T07:04:03Z")

</div>

FYI @LucasGandel

---

<div class="post-metadata">

### Author: ![LucasGandel](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lucasgandel/32/1831_2.png) [@LucasGandel](https://discourse.vtk.org/u/LucasGandel)
#### Post date: [April 7, 2025, 7:11am UTC](https://discourse.vtk.org/t/parallel-problem-in-activiz/15478/3 "2025-04-07T07:11:05Z")

</div>

Both Activiz and VTK are not thread safe. This issue was discussed in this thread: [GetConstructorInfo exception on multiple thread](https://discourse.vtk.org/t/getconstructorinfo-exception-on-multiple-thread/12753).  
We have a partial solution to improve this, please reach out to me directly if you want to discuss how we could work together to add this to the next Activiz release.
