[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Thread-safety issues in QtHandles
From: |
Michael Goffioul |
Subject: |
Re: Thread-safety issues in QtHandles |
Date: |
Sun, 6 Nov 2011 20:22:56 +0000 |
On Sun, Nov 6, 2011 at 4:56 PM, John W. Eaton <address@hidden> wrote:
> If it does one thing, then I don't think size matters.
Really? ;)
More seriously, I've attached the draft patch. It's not finalized in
the sense that I still need to add the changelog entries (and given
the size of the changes, it might be as long as the patch itself...
:)). However, I prefer to submit it early, in case there's some rework
to be done.
The main changes in the patch are:
- use shared_ptr<> instead of home-made refcount for the following classes:
Array::ArrayRep
Sparse::SparseRep
SparseComplexQR::SparseComplexQR_rep
SparseQR::SparseQR_rep
dim_vector
idx_vector::idx_base_rep
octave_base_mutex
octave_shlib::shlib_rep
sparse_base_chol::sparse_base_chol_rep
opengl_texture::texture_rep
vertex_data::vertex_data_rep
base_property
base_graphics_toolkit
base_graphics_object
base_graphics_event
octave_fields::fields_rep
octave_base_stream
octave_base_value
tm_row_const::tm_row_const_rep
symbol_record::symbol_record_rep
fcn_info::fcn_info_rep
- made octave_value(octave_base_value*) constructore private
- made octave_base_value inherit from enable_shared_from_this<>: this
allows to create safe references from the octave_base_value class
itself
- changed signature of the following (because they can potentially
return a new object of a cloned reference)
octave_base_value::type_conv_fcn
octave_base_value::clone
octave_base_value::unique_clone
octave_base_value::try_narrowing_conversion
octave_base_value::find_parent_class
octave_base_value::unique_parent_class
- made the octave parser use shared_ptr when possible to store
function currently parsed; this avoid the bug that popped up when
running the tests in sparse/bicg.m and sparse/bicgstab.m
I know the patch is huge, but you'll quickly notice that the changes
are actually *very* repetitive. Note also that I didn't include any
change in octave_allocator class, though this is required to ensure
thread-safety. I'll let John submit his changes.
Michael.
thread_safe_refcount.bz2
Description: BZip2 compressed data
- Re: Thread-safety issues in QtHandles, (continued)
- Re: Thread-safety issues in QtHandles, Michael Goffioul, 2011/11/15
- Re: Thread-safety issues in QtHandles, Michael Goffioul, 2011/11/15
- Re: Thread-safety issues in QtHandles, Michael Goffioul, 2011/11/15
- Re: Thread-safety issues in QtHandles, Joaquim Luis, 2011/11/15
- Re: Thread-safety issues in QtHandles, Søren Hauberg, 2011/11/15
- Re: Thread-safety issues in QtHandles, Søren Hauberg, 2011/11/15
- Re: Thread-safety issues in QtHandles, Michael Goffioul, 2011/11/28
- Re: Thread-safety issues in QtHandles, Michael D Godfrey, 2011/11/28
- Re: Thread-safety issues in QtHandles, Michael Goffioul, 2011/11/06
- Re: Thread-safety issues in QtHandles, John W. Eaton, 2011/11/06
- Re: Thread-safety issues in QtHandles,
Michael Goffioul <=