fix(lib): adapt to changes in the runtime, also rename "task" to "thread"