Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 07 2018 13:58
    @tobz banned @SoniEx2
  • Aug 01 2018 23:32

    carllerche on gh-pages

    Documentation for tokio-rs/toki… (compare)

  • Aug 01 2018 23:29

    carllerche on master

    Deprecate tokio-proto. (#209) (compare)

  • Aug 01 2018 23:29
    carllerche closed #209
  • Aug 01 2018 19:10
    tobz commented #207
  • Aug 01 2018 19:08
    tobz synchronize #209
  • Aug 01 2018 19:00
    tobz commented #209
  • Aug 01 2018 19:00
    tobz opened #209
  • Jul 26 2018 14:13
    upsuper opened #208
  • Jul 20 2018 03:16
    driftluo edited #207
  • Jul 20 2018 03:15
    driftluo opened #207
  • Jun 15 2018 13:04
    ignatenkobrain opened #206
  • Jun 12 2018 01:41
    rphmeier commented #205
  • Jun 12 2018 01:41
    rphmeier edited #205
  • Jun 12 2018 01:40
    rphmeier commented #205
  • Jun 12 2018 01:40
    rphmeier closed #205
  • Jun 12 2018 01:40
    rphmeier commented #205
  • Jun 12 2018 01:40
    rphmeier commented #205
  • Jun 12 2018 01:36
    rphmeier opened #205
  • Jun 01 2018 13:55
    flosse commented #202
matrixbot
@matrixbot
Aode (Lion) He/They so you shouldn't need another spawn
Aode (Lion) He/They try joining or selecting on your futures
Duan Uys
@duysPES
hmm okay.. joining waits for both of them to finish, based on docs which I don't want because I am wanting the rest of the spawn task to execute while the other async func sends a message every 2 seconds
so i think futures::select might be what I am looking for.
matrixbot
@matrixbot
Aode (Lion) He/They so that sounds like you want a loop with select!
Duan Uys
@duysPES
okay, thank you. I will look into that.
Appreciate the help
Carl Lerche
@carllerche
@/all We are going to be migrating chat to discord: https://discord.gg/tokio I know it isn't a perfect solution for everyone, and I apologize for that. Unfortunately, gitter has proved to be pretty buggy and it does not look like it is being improved on. Also #rustlang uses Discord, so that will unify the chat story a bit.
Joonas Koivunen
@koivunej
yeah I've been wondering about those 2018 actions on the right hand side panel :) see you there then
Kelly Thomas Kline
@kellytk
Mattermost is open source and runs well for everyone
matrixbot
@matrixbot
Ralith I hope rust in general moves off discord in the long run, but it's where it's at now
Jan Hlavatý
@hlavaatch
Is there any way to join whole bunch of futures in a Vec? Or do I have to roll my own?
I'd like to give it Vec<Future<T>>, and have it resolve to Vec<T> once all the futures have resolved
@hlavaatch PS: I would recommend switching to discord: https://discord.gg/tokio
we are moving chat over there
Jan Hlavatý
@hlavaatch
funny, others were suggesting the opposite
but thanks for the pointers
Carl Lerche
@carllerche
@hlavaatch we recently made the switch "official"
(yesterday)
i expect gitter will stay around for a while though
Tom Burdick
@bfrog
what would people recommend if I want to hold on to sockets in a hashmap shared by hyper and a tcp listener
does the hashmap need to be thread safe via Arc<Mutex<HashMap<K,V>>> then?
I imagine it does
Carl Lerche
@carllerche
@bfrog yes
Tom Burdick
@bfrog
And lifetimes aren't going to be an issue? that part is confusing to me
Jan Hlavatý
@hlavaatch
Do you store references?
Tom Burdick
@bfrog
actually I think with the mpsc+oneshot I can do what I want better
need to learn better how socket errors are dealt with though, for cleaning things up
Jan Hlavatý
@hlavaatch
Any recommended strategy how to shutdown all the running tasks in the Runtime when something goes wrong in one of the spawned tasks?
I'm thinking sending error up an error mpsc channel, and having special task waiting for any error on the error channel, and if it receives any it should call Runtime::shutdown_now().
Only problem is i'm currently using the #[tokio::main] to setup and run the Runtime, and don't know how to get at the Runtime that is created under the hood. Will probably have to construct the Runtime myself???
Or should I go nuclear and call std::process::exit() in the async task that got the error?
Jan Hlavatý
@hlavaatch
Dammit i see they dropped Runtime::shutdown_now, how do I abort the Runtime in 0.2.x? Return from the block_on?
matrixbot
@matrixbot
Ralith I like using futures-intrusive's ManualResetEvent to broadcast a shutdown command
cetra3
@cetra3
random question is there a http client that works with 0.2
Carl Lerche
@carllerche
@cetra3 hyper master (on crates.io very soon) https://twitter.com/seanmonstar/status/1202770247993847809
@cetra3 PS, we are moving to discord: https://discord.gg/tokio
cetra3
@cetra3
ok no worries, when is the move to discord?
Carl Lerche
@carllerche
@cetra3 now?
it's been happening for months
quietly
I tried doing a blast notification here, not sure if those get through
cetra3
@cetra3
ok ahaha! thanks I have not been keeping up to date with the chat
Joonas Koivunen
@koivunej
@carllerche note the room topic or channel header says "We're trying out discord: <link>" ... "We have migrated to discord: <link>" perhaps, if anyone happens to read that :)
Carl Lerche
@carllerche
:+1:
matrixbot
@matrixbot
Aode (Lion) He/They any update on potentially bridging discord to matrix/gitter/irc?
Sayan Nandan
@sntdevco
Why the move to Discord though?
Kelly Thomas Kline
@kellytk
Especially when open source friendly alternatives such as Mattermost exist it's a hostile choice
Denis Lisov
@tanriol
We are going to be migrating chat to discord: https://discord.gg/tokio I know it isn't a perfect solution for everyone, and I apologize for that. Unfortunately, gitter has proved to be pretty buggy and it does not look like it is being improved on. Also #rustlang uses Discord, so that will unify the chat story a bit.
Michal 'vorner' Vaner
@vorner
I think rustlang itself is looking into alternatives and decided not to use discord long term, but haven't chosen what else yet.
matrixbot
@matrixbot
Ralith mozilla is looking for something new, but rust in particular afaik has no plans
Kelly Thomas Kline
@kellytk
https://internals.rust-lang.org/t/warning-when-calling-a-blocking-function-in-an-async-context/11440 (annotate any code that is blocking and make that transitive for dead-simple async coding lints for managing blocking code properly) and https://internals.rust-lang.org/t/global-executors/11295 (generic executor API into std so that async code can be automatically portable across any executor) taken together with a tracing crate would provide a very rich async development experience