This is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.
|Session Name:||Multitasking with Coroutines|
|Company Name(s):||CCP Games|
|Track / Format:||Programming|
|Overview:||Tasklets, as a form of cooperative multitasking, are used in EVE Online to drastically simplify program flow in scripts that need to run over multiple frames. Multithreaded programming works well for many things, but sometimes, especially in scripting, cooperative multitasking still has its place. This presentation describes how tasklets are used in EVE, both in the client as well as on the server, showing examples of what tasklets are used for, with Python code samples. The program flow using tasklets is compared to some alternatives, such as using state machines or multiple OS threads. The implementation of tasklets in Stackless Python as used in EVE Online is discussed, as well as some alternatives, such as using regular CPython with greenlets, or Lua using coroutines.|