parameters: (func)
return_statement: return retObj
docstring: Perform the function func once by the first thread to reach
      the function.  The final barrier is required because  a
      thread may try to execute the next single-execution region
      before other threads have finished this region, which the EMS
      runtime cannot tell apart.  Barriers are phased, so a barrier
      is used to prevent any thread from entering the next single-
      execution region before this one is complete
docstring_summary: Perform the function func once by the first thread to reach
      the function.  The final barrier is required because  a
      thread may try to execute the next single-execution region
      before other threads have finished this region, which the EMS
      runtime cannot tell apart.  Barriers are phased, so a barrier
      is used to prevent any thread from entering the next single-
      execution region before this one is complete
docstring_tokens: Perform the function func once by the first thread to reach the function . The final barrier is required because a thread may try to execute the next single - execution region before other threads have finished this region which the EMS runtime cannot tell apart . Barriers are phased so a barrier is used to prevent any thread from entering the next single - execution region before this one is complete
function: def single(func):
      """Perform the function func once by the first thread to reach
      the function.  The final barrier is required because  a
      thread may try to execute the next single-execution region
      before other threads have finished this region, which the EMS
      runtime cannot tell apart.  Barriers are phased, so a barrier
      is used to prevent any thread from entering the next single-
      execution region before this one is complete
      """
      global myID, libems, EMSmmapID, _regionN, pinThreads, domainName, inParallelContext, tasks, nThreads
      retObj = None
      if libems.EMSsingleTask(EMSmmapID):
          retObj = func()
      barrier()
      return retObj
function_tokens: def single ( func ) : global myID , libems , EMSmmapID , _regionN , pinThreads , domainName , inParallelContext , tasks , nThreads retObj = None if libems . EMSsingleTask ( EMSmmapID ) : retObj = func ( ) barrier ( ) return retObj