Hi Konstantin,
Konstantin Osipov, 06.05.2009 21:07:
> * Ingo Strüwing <Ingo.Struewing@stripped> [09/05/06 20:03]:
>> THD::awake() uses two mechanisms to awake a connection from its
>> receiving state:
>>
>> A. thr_alarm_kill(), which is basically pthread_kill(target_thread,
>> SIGALRM), which is meant to awake the target thread from 1.
>> B. close_active_vio(), which is meant to prevent the target thread to
>> fall asleep if it is in state 2. at the moment.
>
> No, close_active_vio() is there for platforms where
> pthread_kill() doesn't interrupt read(), like Mac OS X,
> not to catch a race.
If that is true, then it means that KILL is intentionally planned as
being unreliable. I believe that it is obvious to everybody that
pthread_kill() doesn't interrupt normal code flow as it happens after
the last ckeck of thd->kill before read(). So it was intended that KILL
doesn't work if it hits the target thread at this moment?
I thought that it was an oversight instead. A bug so to say.
Regards
Ingo
--
Ingo Strüwing, Database Group
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring HRB München 161028