Skip to content
By using Twitter’s services you agree to our Cookies Use. We and our partners operate globally and use cookies, including for analytics, personalisation, and ads.

This is the legacy version of twitter.com. We will be shutting it down on June 1, 2020. Please switch to a supported browser, or disable the extension which masks your browser. You can see a list of supported browsers in our Help Center.

  • Home Home Home, current page.
  • About

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English UK
    • Español
    • Filipino
    • Français
    • Hrvatski
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Ελληνικά
    • Български език
    • Русский
    • Српски
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in
    Have an account?
    · Forgot password?

    New to Twitter?
    Sign up
stjepang's profile
Stjepan Glavina
Stjepan Glavina
Stjepan Glavina
@stjepang

Tweets

Stjepan Glavina

@stjepang

async runtimes and concurrency primitives in @rustlang he/they (available for hire)

Berlin, Germany
stjepang.github.io
Joined October 2009

Tweets

  • © 2020 Twitter
  • About
  • Help Center
  • Terms
  • Privacy policy
  • Imprint
  • Cookies
  • Ads info
Dismiss
Previous
Next

Go to a person's profile

Saved searches

  • Remove
  • In this conversation
    Verified accountProtected Tweets @
Suggested users
  • Verified accountProtected Tweets @
  • Verified accountProtected Tweets @

Promote this Tweet

Block

  • Tweet with a location

    You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Copy link to Tweet

    Embed this Tweet

    Embed this Video

    Add this Tweet to your website by copying the code below. Learn more

    Add this video to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    By embedding Twitter content in your website or app, you are agreeing to the Twitter Developer Agreement and Developer Policy.

    Preview

    Why you're seeing this ad

    Log in to Twitter

    · Forgot password?
    Don't have an account? Sign up »

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Sign up
    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

     

    Welcome home!

    This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.

    Tweets not working for you?

    Hover over the profile pic and click the Following button to unfollow any account.

    Say a lot with a little

    When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.

    Spread the word

    The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.

    Join the conversation

    Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.

    Learn the latest

    Get instant insight into what people are talking about now.

    Get more of what you love

    Follow more accounts to get instant updates about topics you care about.

    Find what's happening

    See the latest conversations about any topic instantly.

    Never miss a Moment

    Catch up instantly on the best stories happening as they unfold.

    1. Stjepan Glavina‏ @stjepang Mar 20
      • Report Tweet
      • Report NetzDG Violation

      Some musings on the async ecosystem and compatibility between async-std and tokio... 1/15

      1 reply 12 retweets 56 likes
      Show this thread
      Stjepan Glavina‏ @stjepang Mar 20
      • Report Tweet
      • Report NetzDG Violation

      When the async-std runtime was first introduced, some were worried that the async ecosystem would get split into two: one based on tokio and one based on async-std. Now I'm working on the third major runtime. Very soon we'll have a lot of different runtimes to choose from. 2/15

      8:48 AM - 20 Mar 2020
      • 2 Retweets
      • 5 Likes
      • Aaron Turon Ted Mielczarek Masaki Hara serzhiio | capitalist nop3 Frank オワ
      1 reply 2 retweets 5 likes
        1. New conversation
        2. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          But remember, the Future trait and the futures crate have always been intentionally designed to be completely agnostic to the underlying runtimes. So there shouldn't be any fragmentation, no matter how many runtimes there are. 3/15

          1 reply 1 retweet 5 likes
          Show this thread
        3. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          To avoid the ecosystem split, async libraries should not depend on async-std or tokio. Only binaries should use a runtime as a dependency. 4/15

          2 replies 0 retweets 9 likes
          Show this thread
        4. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          The main question is then: what should async libraries do if they need to spawn futures or use types like TcpStream? The answer is that they shouldn't. And in most cases they really don't need to... 5/15

          1 reply 1 retweet 6 likes
          Show this thread
        5. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          Instead of spawning a future, your async library should return the future to the user so that the user can spawn it however they want. 6/15

          1 reply 1 retweet 8 likes
          Show this thread
        6. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          Instead of creating a TcpStream inside your async library, let the user create one for you and then accept any stream implementing AsyncRead and AsyncWrite as an argument. 7/15

          5 replies 1 retweet 6 likes
          Show this thread
        7. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          To illustrate what that means in practice, let's compare hyper and async-h1. 8/15 https://docs.rs/hyper  https://docs.rs/async-h1 

          1 reply 1 retweet 3 likes
          Show this thread
        8. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          Here's a hyper server running on async-std. 9/15 https://github.com/async-rs/async-std-hyper/blob/6025fafe549a2b4715c8bf9e80fa8240be81ff8a/src/main.rs …pic.twitter.com/sMHgFGGMy4

          1 reply 0 retweets 4 likes
          Show this thread
        9. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          Here's an async-h1 server running on async-std. 10/15 https://github.com/http-rs/async-h1/blob/f930e7bbbb48c21c69535ab86a4cdc5a36ecde49/examples/server.rs …pic.twitter.com/nxKAja8Cdz

          1 reply 0 retweets 4 likes
          Show this thread
        10. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          Hyper requires a lot of glue code because it starts an HTTP server on its own and then needs to invoke your runtime's functions. 11/15

          1 reply 0 retweets 2 likes
          Show this thread
        11. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          In contrast to that, async-h1 lets you create a TCP listener and accept TCP streams on your own. Then, all async-h1 does is it reads HTTP requests from an AsyncRead and writes HTTP responses into an AsyncWrite. 12/15

          1 reply 0 retweets 3 likes
          Show this thread
        12. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          The key difference is: hyper acts like a framework because it invokes your code, while async-h1 acts like a library because it's invoked by your code. 13/15

          1 reply 0 retweets 9 likes
          Show this thread
        13. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          Async-h1 doesn't even care about the actual HTTP server - it's basically an async HTTP serialization/deserialization library! 14/15

          1 reply 0 retweets 6 likes
          Show this thread
        14. Stjepan Glavina‏ @stjepang Mar 20
          • Report Tweet
          • Report NetzDG Violation

          In conclusion, prefer async libraries over async frameworks. If async libraries only use the standard Future/Stream/AsyncRead/AsyncWrite traits to interface with the outside world, we won't end up with an ecosystem split. 15/15

          4 replies 3 retweets 27 likes
          Show this thread
        15. End of conversation

      Loading seems to be taking a while.

      Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

        Promoted Tweet

        false

        • © 2020 Twitter
        • About
        • Help Center
        • Terms
        • Privacy policy
        • Imprint
        • Cookies
        • Ads info