Processes, threads, green threads, protothreads, fibers, coroutines: what's the difference?

前端 未结 4 1505
孤城傲影
孤城傲影 2021-01-29 18:27

I\'m reading up on concurrency. I\'ve got a bit over my head with terms that have confusingly similar definitions. Namely:

  • Processes
  • Threads
  • \"
4条回答
  •  独厮守ぢ
    2021-01-29 18:28

    Protothreads are just a switch case implementation that acts like a state machine but makes implementation of the software a whole lot simpler. It is based around idea of saving a and int value before a case label and returning and then getting back to the point after the case by reading back that variable and using switch to figure out where to continue. So protothread are a sequential implementation of a state machine.

提交回复
热议问题