[sgen] Implement work context for thread pool threads