I'm implementing an M:N job scheduler and I'd like for jobs to be able to be suspended in the middle of a stack. I'm wondering if there are any coroutine implementations that support semantics similar to those of Windows fibers. Specifically, I want for a coroutine to be able to yield in one thread and be resumed in another. I know about Boost.coroutine, but unfortunately it doesn't support thread migration, from what I've read.
Wikipedia claims[1] that fibers can be implemented with pthread using the {make|get|set|swap}context() functions. Does anyone know if these functions allow contexts to be moved around threads? A quick scan through the man pages[2][3] doesn't seem to imply that this would be a problem.