View Issue Details

IDProjectCategoryView StatusLast Update
0032449Open CASCADEOCCT:Modeling Algorithmspublic2021-07-23 10:16
ReporterasuravenAssigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionnot fixable 
Target Version7.6.0 
Summary0032449: Modeling Algorithms - make curves adaptors classes thread safe
DescriptionAdaptor3d_Curve, Adaptor2d_Curve2d and its child classes are not thread safe, but it is necessary for using GeomLib_CheckCurveOnSurface class for validity checking. As possible solution provide thread safety for them using separate cash for every thread.
TagsNo tags attached.
Test case number

Relationships

related to 0027491 closedbugmaster Community Modeling Data - document thread-safety behavior of GeomAdaptor_Curve 
related to 0024682 closedbugmaster Open CASCADE Move out B-spline cache from curves and surfaces to dedicated classes BSplCLib_Cache and BSplSLib_Cache 
related to 0032450 closedbugmaster Open CASCADE Modeling Algorithms - change BRepLib_CheckCurveOnSurface & GeomLib_CheckCurveOnSurface interfaces to adaptors 
related to 0032485 closedbugmaster Open CASCADE Modeling Algorithms - Add Clone() function for adapters 

Activities

asuraven

2021-06-16 18:53

reporter   ~0101877

Last edited: 2021-06-21 10:13

msv

2021-06-16 19:21

developer   ~0101878

The classes in Adaptor3d and Adaptor2d are just interfaces. The real source of thread safety break is in the classes of packages Geom2dAdaptor and GeomAdaptor.

For generality, we need to improve not only curve adaptors, but also surface adaptor.

So, the classes to improve for thread safety are:

Geom2dAdaptor_Curve
GeomAdaptor_Curve
GeomAdaptor_Surface

asuraven

2021-07-06 20:49

reporter   ~0102316

asuraven

2021-07-08 17:11

reporter   ~0102379

asuraven

2021-07-13 17:25

reporter   ~0102497

asuraven

2021-07-15 15:04

reporter   ~0102544

asuraven

2021-07-15 16:46

reporter   ~0102549

kgv

2021-07-16 14:41

developer   ~0102577

Making Adaptor classes thread-safe contradicts to their current design.
Previously, it has been discussed, that in case multi-threaded context, algorithm should create thread-local Adapator instance.

This could be achieved by using OSD_ThreadPool::Launcher with a functor accepting thread index for accessing thread-local variables within pre-allocated array of extent equal to (maximum) number of threads captured by OSD_ThreadPool::Launcher from Thread Pool at it's construction time.

It might be necessary extending Adaptor with Clone interface to be able to duplicate Adpator instances within specific algorithm.

asuraven

2021-07-16 18:30

reporter   ~0102589

asuraven

2021-07-19 12:44

reporter   ~0102633

Last edited: 2021-07-19 12:51

After the analysis, it was decided not to add thread safety to adapters, but to ensure thread safety when using them. A new 32485 issue was created for provide multithread adaptors using.

asuraven

2021-07-19 12:52

reporter   ~0102637

 this task can be closed

szy

2021-07-23 10:16

manager   ~0102736

A new 32485 issue was created to allow thread-safe usage of adaptors.

Issue History

Date Modified Username Field Change
2021-06-16 18:53 asuraven New Issue
2021-06-16 18:53 asuraven Assigned To => msv
2021-06-16 18:53 asuraven Note Added: 0101877
2021-06-16 19:04 asuraven Relationship added related to 0032450
2021-06-16 19:15 msv Relationship added related to 0027491
2021-06-16 19:21 msv Note Added: 0101878
2021-06-16 20:46 kgv Relationship added related to 0024682
2021-06-21 10:13 szy Note Edited: 0101877
2021-07-02 17:41 szy Assigned To msv => asuraven
2021-07-02 17:42 szy Status new => assigned
2021-07-06 20:49 asuraven Note Added: 0102316
2021-07-08 17:11 asuraven Note Added: 0102379
2021-07-13 17:25 asuraven Note Added: 0102497
2021-07-15 15:04 asuraven Note Added: 0102544
2021-07-15 16:46 asuraven Note Added: 0102549
2021-07-16 14:41 kgv Note Added: 0102577
2021-07-16 14:41 kgv Severity minor => feature
2021-07-16 18:30 asuraven Note Added: 0102589
2021-07-19 12:43 asuraven Relationship added related to 0032485
2021-07-19 12:44 asuraven Note Added: 0102633
2021-07-19 12:51 asuraven Note Edited: 0102633
2021-07-19 12:52 asuraven Note Added: 0102637
2021-07-19 12:52 asuraven Assigned To asuraven => bugmaster
2021-07-19 12:52 asuraven Status assigned => feedback
2021-07-23 10:16 szy Note Added: 0102736
2021-07-23 10:16 szy Status feedback => closed
2021-07-23 10:16 szy Resolution open => not fixable