[asterisk-dev] Pthread wrapper updates

Tim Panton tim at mexuar.com
Fri Nov 3 12:19:41 MST 2006


On 1 Nov 2006, at 12:05, SF Markus Elfring wrote:

>
>> Sure, so a 'new' call fails (possibly horribly), but any in- 
>> progress calls will continue until they
>> need to access the problematic resource (possibly never).
> You have not got any benefit from this kind of unwanted  
> continuation. Can you also imagine that the resource like a lock is  
> absolutely required for thread-safety?

Sorry, I wasn't clear. I don't think that a thread that is unable get  
a lock should
just continue - the action it is attempting should fail. On the other  
hand just because
that thread can't continue thats no reason to abort the entire  
asterisk _process_.

So - sure -  abort the action to protect the rest of the process, but  
don't
kill the process just because one thread is stuck.


>
>> If you abort, then all in progress calls fail needlessly.
> Why is it needless if software correctness should be achieved?
> I am concerned about undefined program behaviour, aren't you?

Hmm, if I'm on the phone reporting a fire and asterisk is about to  
crash because
500 other people are trying to do the same thing, I'm more concerned  
with
_my_ call continuing than with asterisk's ability to achieve some  
'correct' behavior.
(or looked at another way if any one of those 500 calls gets through  
that is better than
none of them going through).


I guess it depends on what the scope of 'abort' is - thread ok -  
process not so good.

Regards,

Tim.

Tim Panton

www.mexuar.net





More information about the asterisk-dev mailing list