xthread now supports closures