I think lthread (http://github.com/halayli/lthread) is the only coroutine lib that allows you to block inside a coroutine and do heavy computation without affecting other coroutines.
Example:
void my_function(void* arg)
{
char buf[1024];
int ret = lthread_recv_exact(fd, buf, 1024, 0, timeout);
lthread_compute_begin();
/* block as long as you wish, run heavy computation on buf, access your stack variables etc.. */
lthread_compute_end();
}
Example:
Disclaimer: lthread author.