Anonymous | Login | 2021-01-18 08:23 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0016846 | Community | [OCCT] OCCT:Foundation Classes | public | 2007-09-05 11:06 | 2011-12-01 11:22 | ||||
Reporter | abv | ||||||||
Assigned To | abv | ||||||||
Priority | normal | Severity | trivial | ||||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | All | OS Version | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | [OCCT] 6.2.1 | |||||||
Summary | 0016846: [OCCT Forum] Multithreading troubles: reference counter of Standard_Transient | ||||||||
Description | As indicated on OCCT Forum message http://www.opencascade.org/org/forum/thread_11273, [^] OCCT Handle mechanism is not thread-safe due to the fact that reference counter is not protected against simultaneous modification by several threads. See IFMT 214 for discussion of how this can be fixed | ||||||||
Additional information and documentation updates | Documentation remark, added by ABV 2007-10-22 15:46:39: New features: New static functions IsReentrant() and SetReentrant() are added in Standard package to query and set flag for reentrant (i.e. thread-safe) mode of operation of TKernel services (memory manager, handles, exceptions). Note that by default this mode is Off; it can be activated also by defining environment variable MMGT_REENTRANT before starting OCCT. Improvements: Reference counter in Standard_Transient class (thus all OCCT classes managed by handles) is protected to be thread-safe. Note that this protection is effective only on Windows and Linux platforms by the moment, and is active only if reentrant mode is set (see Standard::IsReentrant()). Note that this improvement leads to some downgrade of performance of creation and desctruction of Handle objects (by ~ 2 times when reentrant mode is OFF, ~ 10 times when it is ON), thus it becomes yet more important to avoid creation of unnecessary Handles in performance-critical parts of the code. For information, the time of creation and destruction of one Handle measured on P4 3GHz CPU is around 20 ns in non-reentrant mode and 100 ns in reentrant mode. Changes: Some changes have been made in basic OCCT headers: - Statement "using std;" in Standard_Stream.hxx has been replaced by individual "using" statements for several types used extensively inside OCCT code. This should reduce risk of conflicts between OCCT headers and application codes due to imported STL names. On the other side, some code probably might need to be corrected to add std:: prefix before STL classes (or equivalent using statement). - In Standard_Macro.hxx for WNT plaftform, a number of macros have been defined (such as WIN32_LEAN_AND_MEAN) aimed to reduce scope of symbols defined by eventual inclusion of windows.h. This is necessary to prevent interference between multiple macro definitions made in windows.h (e.g. SendMessage #defined as SendMessageA) and normal code of OCCT and applications. If some code needs complete set of symbols defined in windows.h, this code may include windows.h prior to OCCT headers. | ||||||||
Tags | No tags attached. | ||||||||
Test case number | |||||||||
Attached Files | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | ||||||||
![]() |
|||
Date Modified | Username | Field | Change |
2007-09-05 11:28 | abv | CC | => pdn, szv, agv |
2007-09-07 16:51 | bugmaster | Status | closed => assigned |
2007-09-07 16:51 | bugmaster | Resolution | suspended => @0@ |
2007-09-07 16:52 | bugmaster | Assigned To | bugmaster => abv |
2007-09-10 13:24 | abv | Status | assigned => resolved |
2007-10-09 17:24 | bugmaster | Status | resolved => tested |
2007-10-25 18:31 | bugmaster | Status | tested => verified |
2009-06-23 17:10 | bugmaster | Status | verified => closed |
2009-06-23 17:10 | bugmaster | Resolution | @0@ => fixed |
2011-08-02 11:23 | bugmaster | Category | OCCT:FDC => OCCT:Foundation Classes |
2011-11-28 10:38 | abv | Description Updated | View Revisions |
2011-11-28 10:38 | abv | Additional Information Updated | View Revisions |
2011-11-28 10:39 | abv | Description Updated | View Revisions |
2011-12-01 11:22 | szy | Additional Information Updated | View Revisions |
Copyright © 2000 - 2021 MantisBT Team |