タグ

software-engineeringとsubroutineに関するnabinnoのブックマーク (2)

  • Exception handling - Wikipedia

    "Error handling" redirects here. Not to be confused with Error detection and correction. In computing and computer programming, exception handling is the process of responding to the occurrence of exceptions – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an exception breaks the normal flow of execution and executes a pre-register

  • コルーチン - Wikipedia

    コルーチン(英: co-routine)とはプログラミングの構造の一種。サブルーチンがエントリーからリターンまでを一つの処理単位とするのに対し、コルーチンはいったん処理を中断した後、続きから処理を再開できる。接頭辞 co は協調を意味するが、複数のコルーチンが中断・継続により協調動作を行うことによる。 サブルーチンと異なり、状態管理を意識せずに行えるため、協調的処理、イテレータ、無限リスト、パイプなど、継続状況を持つプログラムが容易に記述できる。 コルーチンはサブルーチンを一般化したものと考えられる。コルーチンをサポートする言語には Modula-2、Simula、Icon、Lua、C#、Limbo、Swift などがある。マルチスレッドで理論的には同じことができるため、現在はそちらが使われるケースが多い。これはマルチスレッドであれば直接OSやCPUスレッドの支援を受けられることや、エント

  • 1