parameters: (filename, clean_lines, linenum, error)
docstring: Checks for calls to thread-unsafe functions.
  
    Much code has been originally written without consideration of
    multi-threading. Also, engineers are relying on their old experience;
    they have learned posix before threading extensions were added. These
    tests guide the engineers to use thread-safe functions (when using
    posix directly).
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
docstring_summary: Checks for calls to thread-unsafe functions.
docstring_tokens: Checks for calls to thread - unsafe functions .
function: def CheckPosixThreading(filename, clean_lines, linenum, error):
    """Checks for calls to thread-unsafe functions.
  
    Much code has been originally written without consideration of
    multi-threading. Also, engineers are relying on their old experience;
    they have learned posix before threading extensions were added. These
    tests guide the engineers to use thread-safe functions (when using
    posix directly).
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
    """
    line = clean_lines.elided[linenum]
    for single_thread_function, multithread_safe_function in threading_list:
      ix = line.find(single_thread_function)
      # Comparisons made explicit for clarity -- pylint: disable=g-explicit-bool-comparison
      if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and
                                  line[ix - 1] not in ('_', '.', '>'))):
        error(filename, linenum, 'runtime/threadsafe_fn', 2,
              'Consider using ' + multithread_safe_function +
              '...) instead of ' + single_thread_function +
              '...) for improved thread safety.')
function_tokens: def CheckPosixThreading ( filename , clean_lines , linenum , error ) : line = clean_lines . elided [ linenum ] for single_thread_function , multithread_safe_function in threading_list : ix = line . find ( single_thread_function ) # Comparisons made explicit for clarity -- pylint: disable=g-explicit-bool-comparison if ix >= 0 and ( ix == 0 or ( not line [ ix - 1 ] . isalnum ( ) and line [ ix - 1 ] not in ( '_' , '.' , '>' ) ) ) : error ( filename , linenum , 'runtime/threadsafe_fn' , 2 , 'Consider using ' + multithread_safe_function + '...) instead of ' + single_thread_function + '...) for improved thread safety.' )