Skip to content

Instantly share code, notes, and snippets.

@tawashichan
Created December 9, 2019 04:36
Show Gist options
  • Save tawashichan/9dc95a6d79ff2fd22db1a41106fc1a31 to your computer and use it in GitHub Desktop.
Save tawashichan/9dc95a6d79ff2fd22db1a41106fc1a31 to your computer and use it in GitHub Desktop.
hyper_memo
  • 共通

    • Executorというtraitをimplする型が,tokioのtaskをspawnする責務を担っている(よってhyperはtokio runtimeでないと動かない)。ただしExecutorはtraitになっているので、実装の差し替えが考慮されている?(外部からcustom executorを差し込めるかは不明)
      • なんかそれっぽいissueはある(hyperium/hyper#1854)
      • Executor traitはtokio_executorのものなのでtokioからは逃れられないのだ...
    • wakerどっかで呼んでるはずだけどどこ?
  • hyper serverメモ

  • hyper client メモ

    • get requestの場合
      • ClientのrequestがResponseFutureを返している(Future traitをimplしている)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment