Add waiting/resuming to TLS funcs.

Nice and simple, no callbacks or timeouts.