coroutines

coroutines

concurrent vs parallel

every parallel program is concurrent, but the converse is not necessarily true

  • concurrent
    • two or more actions in progress at the same time.
    • a program-structuring technique
    • concerned only with efficiency
  • parallel
    • two or more actions executing simultaneously
    • uses a multiplicity of computational hardware(多核cpu)