Re: [LAD] Inter thread Communication: Design Approach

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Gabriel Beddingfield <gabrbedd@...>
Cc: The Linux Audio Developers' Mailing List <linux-audio-dev@...>
Date: Friday, September 2, 2011 - 4:29 pm

On Fri, 2011-09-02 at 11:03 -0500, Gabriel Beddingfield wrote:

You may be able to get away with it depending on your compiler
implementation/system/phase of the moon, but since in this particular
example you're just dispatching by type anyway and gaining nothing from
using inheritance, it'd be a bit silly to do so...

This may be a hand-wavey justification, but I have seen some pretty
weird stuff happen when I treated not-strictly but pretty-much-POD
objects as POD data. Weird stuff like things working fine 99% of the
time but catastrophically exploding occasionally. Given that this is
explicitly illegal (i.e. that you don't do this is an assumption the
compiler makes), and aggressive optimization is in use, this isn't too
surprising. It's best not to tread in that dark valley, C++ is awful
enough when you follow the rules :)

-dr

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Inter thread Communication: Design Approach, Harry van Haaren, (Sat Aug 20, 2:19 pm)
Re: [LAD] Inter thread Communication: Design Approach, Gabriel Beddingfield, (Sat Aug 20, 3:04 pm)
Re: [LAD] Inter thread Communication: Design Approach, David Robillard, (Thu Sep 1, 6:18 pm)
Re: [LAD] Inter thread Communication: Design Approach, Gabriel Beddingfield, (Fri Sep 2, 2:29 am)
Re: [LAD] Inter thread Communication: Design Approach, David Robillard, (Fri Sep 2, 3:22 pm)
Re: [LAD] Inter thread Communication: Design Approach, Gabriel Beddingfield, (Fri Sep 2, 4:03 pm)
Re: [LAD] Inter thread Communication: Design Approach, David Robillard, (Fri Sep 2, 4:29 pm)
Re: [LAD] Inter thread Communication: Design Approach, Harry van Haaren, (Thu Sep 1, 8:37 pm)
Re: [LAD] Inter thread Communication: Design Approach, Florian Paul Schmidt, (Fri Sep 2, 8:36 am)
Re: [LAD] Inter thread Communication: Design Approach, David Robillard, (Fri Sep 2, 3:13 pm)
Re: [LAD] Inter thread Communication: Design Approach, Florian Paul Schmidt, (Fri Sep 2, 5:29 pm)
Re: [LAD] Inter thread Communication: Design Approach, Harry van Haaren, (Fri Sep 2, 11:59 am)
Re: [LAD] Inter thread Communication: Design Approach, Fons Adriaensen, (Thu Sep 1, 6:37 pm)
Re: [LAD] Inter thread Communication: Design Approach, David Robillard, (Thu Sep 1, 8:30 pm)
Re: [LAD] Inter thread Communication: Design Approach, Fons Adriaensen, (Fri Sep 2, 10:04 am)
Re: [LAD] Inter thread Communication: Design Approach, Fons Adriaensen, (Sat Sep 3, 9:25 pm)
Re: [LAD] Inter thread Communication: Design Approach, Florian Paul Schmidt, (Sun Sep 4, 10:22 am)
Re: [LAD] Inter thread Communication: Design Approach, Florian Paul Schmidt, (Fri Sep 2, 10:50 am)
Re: [LAD] Inter thread Communication: Design Approach, David Robillard, (Thu Sep 1, 8:34 pm)
Re: [LAD] Inter thread Communication: Design Approach, Harry van Haaren, (Sat Aug 20, 4:17 pm)
Re: [LAD] Inter thread Communication: Design Approach, Arnold Krille, (Sat Aug 20, 3:57 pm)