Git Product home page Git Product logo

Comments (9)

uzytkownik avatar uzytkownik commented on May 12, 2024

I think add_feature is meant to be spawn. That said I cannot figure out what it is suppose to do.

from actix.

fafhrd91 avatar fafhrd91 commented on May 12, 2024

sorry, I am a bit busy at the moment. I will fix doc in few hours

from actix.

DoumanAsh avatar DoumanAsh commented on May 12, 2024

@fafhrd91 I can take on updating docs for StreamHandler since I was using it recently.
I think add_stream should refer to StreamHandler and there we can add all needed information on how it should work

from actix.

fafhrd91 avatar fafhrd91 commented on May 12, 2024

@DoumanAsh sure

from actix.

uzytkownik avatar uzytkownik commented on May 12, 2024

No worries.

In meantime is there a way of blocking stream I don't see? I can implement it myself but IMHO it looks kind of awkward.

from actix.

fafhrd91 avatar fafhrd91 commented on May 12, 2024

You can just create timeout future and wait for it. While waiting actor is paused

from actix.

uzytkownik avatar uzytkownik commented on May 12, 2024

@fafhrd91 I know but I don't want to pause actor - I want to pause the stream (or rather processing of stream). Given your comment I'm assuming there isn't such thing despite quoted comment suggesting otherwise.


This gets slightly off-topic but the comment suggested there was some way I could block stream. I'm assuming it happens with add_message_stream when I return a Future but it doesn't seem to do so (my underlying problem is that I want two websocket threads to communicate. However if I wait and they both try to send messages they will deadlock).

from actix.

DoumanAsh avatar DoumanAsh commented on May 12, 2024

@uzytkownik You can move to gitter chat for off-topic. But note that even if you want to block only stream, you're likely to block everything else by it too unless you convert it to ActorFuture

from actix.

fafhrd91 avatar fafhrd91 commented on May 12, 2024

updated

from actix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.