Skip to content

Instantly share code, notes, and snippets.

@justuswilhelm
Last active September 17, 2015 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justuswilhelm/f3f6235d2da3d2d3c9d0 to your computer and use it in GitHub Desktop.
Save justuswilhelm/f3f6235d2da3d2d3c9d0 to your computer and use it in GitHub Desktop.
Python coroutine.py output
(env)/Users/justusperlwitz/kata master $ python python/coroutine.py
Running synchronous example
https://www.google.de/?gfe_rd=: <!doctype in 0:00:00.595261s
https://m.yahoo.com/w/legobpen: <?xml vers in 0:00:00.606704s
http://www.bbc.co.uk/ : <!DOCTYPE in 0:00:00.151236s
https://en.wikipedia.org/wiki/: <!DOCTYPE in 0:00:00.040530s
https://de.wikipedia.org/wiki/: <!DOCTYPE in 0:00:00.040885s
https://news.ycombinator.com/ : <html op=" in 0:00:01.055622s
https://www.tagesschau.de/ : <!DOCTYPE in 0:00:00.524701s
Running asynchronous example
https://m.yahoo.com/w/legobpen: <?xml vers in 0:00:00.594251s
https://de.wikipedia.org/wiki/: <!DOCTYPE in 0:00:00.053955s
http://www.bbc.co.uk/ : <!DOCTYPE in 0:00:00.120197s
https://www.google.de/?gfe_rd=: <!doctype in 0:00:00.166451s
https://news.ycombinator.com/ : <html op=" in 0:00:00.302856s
https://en.wikipedia.org/wiki/: <!DOCTYPE in 0:00:00.041804s
https://www.tagesschau.de/ : <!DOCTYPE in 0:00:00.163336s
Synchronous example took 9.656602144241333 seconds
Asynchronous example took 5.246562957763672 seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment