Hi guys,
The current prototype for locking the audio engine is:
void lock(const QString&);
bool try_lock(const QString&);
I'm proposing that we change it to:
void lock();
bool try_lock();
Approve? Object? Thoughts? Comments? Don't know? :-)
DETAILS.......
As you know, these are typically used like this:
AudioEngine::get_instance()->lock( "some_function_name" );
Which resolves to:
AudioEngine::get_instance()->lock( QString("some_function_name") );
In tracking down zombies, I've found several cases where using QStrings can
create a wait condition -- likely because the QStrings allocate memory for the
string dynamically. Everywhere this is done, the QString constructor is being
called. In the GUI thread, this is no big deal. In the audio sections, it's a
very big deal.
So, I'm proposing removing the parameter for the following reasons:
1. The QString constructor appears to be _NOT_ realtime safe,
as mentioned above.
2. The AudioEngine::__locker parameter is being removed because
QString::operator=(const QString&) is not realtime safe,
either. So, we're not actually *using* the parameter
at the moment.
3. In debugging deadlocks, I don't think this information has
ever been helpful to me.
4. Setting a breakpoint on AudioEngine::lock() can often
accomplish the same thing.
The reason I'm asking is that #3 may not be true for everyone, and #4 is a real
pain -- and usually not very useful, either.
Peace,
Gabriel
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel