cothreads userspace threads Cothreads are a simple user-space method for switching between subtasks. They're based on setjmp()/longjmp() in their current form. Cothreads are used for loop-based elements that pull data instead of being fed with data. They can also be used to pull a specific region of data out of their src element. Get the current stack frame. @ctx: @threadnum: @priv: @func: @argc: @argv: @flags: @sp: @jmp: @top_sp: @pc: @magic_number: the function that will be called when the cothread starts. The function prototype is like a main() function, so you can do whatever you want with it. @argc: a main-like argument count @argv: a main-like array of arguments @Returns: a return code Indicates the cothread is started. Indicates the cothread is destroyed. @Returns: @ctx: @thread: @Returns: @thread: @data: @ctx: @Returns: @thread: @thread: @func: @argc: @argv: @thread: @thread: @thread: @key: @Returns: @thread: @key: @data: @thread: @thread: @Returns: @thread: @ctx: @Returns: @Returns: @Returns: