Changes between Initial Version and Version 1 of Ticket #12319, comment 1


Ignore:
Timestamp:
Aug 25, 2015, 12:49:20 PM (9 years ago)
Author:
ttcoder

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12319, comment 1

    initial v1  
    3232
    3333Anyway I'll obviously re-organize the code which is deffective due to that unprotected kill_thread call, but I'll only feel 100% reassured if I also can use a re-entrant version of gethostbyname :-)
     34
     35'''EDIT''': I've hit duckduckgo a bit and the function is dubbed "obsolete" but I'm not sure what bearing that has on the re-entrancy discussion Here. More interesting, I also found this:
     36{{{
     37gethostbyname() .... uses static storage that is re-used in each call, making these functions unsafe for use in multithreaded applications.
     38}}}
     39but again I'm not sure if they're just saying to not call it from concurrent threads at the same time, or if that also implies that the function is not state-neutral, i.e. you can't call it twice in sequence if it was interrupted before completing the first time.