by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    David Fowler
    @davidfowl
    even if some of it will be replaced
    Tim Seaward
    @Drawaes
    I will look when I am stuck on other stuff...
    David Fowler
    @davidfowl
    I just need to convince @benaadams to use it for his game :smile:
    Tim Seaward
    @Drawaes
    Hahaha
    Need to convince the powers that b to ditch jms based stuff for our trading apps
    It's basically a video game with 2000 realtime users ;)
    David Fowler
    @davidfowl
    image.png
    Tim Seaward
    @Drawaes
    Still libuv?
    Looks good tho
    David Fowler
    @davidfowl
    this is specifically adding libuv
    for sockets you do UseSocketsServer
    Tim Seaward
    @Drawaes
    I am still hammering away at sslstream
    It's slow progress... resistance is high
    David Fowler
    @davidfowl
    I was going to ask if you're making any progress?
    Tim Seaward
    @Drawaes
    Had 2 prs merged
    Bring of another
    Brink
    Slowly chopping out the apm madness
    David Fowler
    @davidfowl
    lol
    Tim Seaward
    @Drawaes
    still have the linux openssl lock convoy issue
    but heading to a place that it can be removed
    I am concerned about ALPN etc making it more mad internally
    but I am trying to keep a lid on the devs :)
    David Fowler
    @davidfowl
    when is alpn coming
    I need to ask about progrress
    Tim Seaward
    @Drawaes
    I dunno, it's taking a fair while
    shouldn't be long though
    the API is agreed (finally)
    although halter and I wanted something different.. they weren't up for it ;)
    some mind bending code ;)
    local functions to swap to async
    so 1 "flow" for sync and async
    and if the network card buffers are never full you never go async ;)
    David Fowler
    @davidfowl
    what is this crazy shit
    Tim Seaward
    @Drawaes
    that is some @drawaes toub @benaadams magic right there ;)
    never pay the async cost, if the method go straight through sync :)
    5% faster ;)
    image.png
    than APM that was there
    and less allocations of APM and task garbage
    thats only changing the write side, the read side is the follow up ;)
    Brian Chavez
    @bchavez
    Hello. I'm using System.IO.Pipelines.Pipe and have a quick question: How can I know when the PauseWriterThreshold has been reached in a Pipe? I have a thread reading from a UDP port as fast as possible and the thread writes data received into a Pipe but I don't want the writer to be blocked when PauseWriterThreshold has been reached. If the write threshold has been reached, I need to "drop" the write and continue reading UDP port data. I'd like to resume writing data to the Pipe when I know I won't be blocked.
    Brian Chavez
    @bchavez
    Oh, I checked the source, maybe keep around the task of the last write? https://github.com/dotnet/corefx/blob/b09c098f2e0c7934dac8a4c7e38a5bf249a5b955/src/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs#L327-L372 Then check IsCompleted? :)
    David Fowler
    @davidfowl
    yo
    :)
    the write async or flush async will block asynchronously
    Brian Chavez
    @bchavez

    Thanks @davidfowl , I'm mostly in a situation where I have a dedicated thread that needs to know a priori if calling a WriteAsync or FlushAsync would ultimately block. In other words, if Write/FlushAsync.GetAwaiter().GetResult() would block or not. Currently, I don't see anything I can use in the public Pipe API that I could use to know that the next call with N bytes to Write or Flush would block.

    The only thing I can think of so far, is to keep around the last Task from Write/FlushAsync and check if Task.IsCompleted is true or not. Now I have enough information to know if the Pipe is full or not I guess.