Ignore:
Timestamp:
Apr 10, 2007, 5:57:02 PM (18 years ago)
Author:
ansari
Message:

Ajout classe ThSafeOp (thsafeop.h) pour rendre NDataBlock<T> (et SegDataBlock) thread-safe, ajout methode DataTypeInfo::getTypeId() , implementation ThSafeOp ds ndatablock.cc (.h), Reza 10/04/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/ndatablock.h

    r3172 r3208  
    1010#include "anydataobj.h"
    1111#include <iostream>
     12
     13#include "thsafeop.h"      /* For thread safe operation (Ref.Count/Share) */
    1214
    1315namespace SOPHYA {
     
    8890  void Realloc(size_t nnew,bool force=false);
    8991 
    90   //! Calls Delete() to set the size to zero (The memory is freed if last referenced structure)
    91   inline void Dealloc() { Delete(); }
     92  //  Public, thread safe interface to Delete() (set the size to zero)
     93  void Dealloc();
    9294
    9395  // Informations pointeur/data
     
    172174  static size_t NallocData; //!< DEBUG: number of allocations (all type<T> classes)
    173175  static size_t NallocSRef; //!< DEBUG: number of references (all type<T> classes)
     176  static ThSafeOp* gThsop;  //!< DEBUG: for thread safe operation
    174177
    175178  size_t       mSz;      //!< size of data structure
Note: See TracChangeset for help on using the changeset viewer.