![andthen actix block andthen actix block](https://64.media.tumblr.com/c8780271dac39a532a85955ea806a56a/350a71b709be8f30-da/s1280x1920/19b3970d395cbf03f6d8811707d5b7145d1f2a23.jpg)
It is not very interesting to continue development. I appreciate everything you've done for this project this far and I think this is the future of server-side web development for sure.Īny sort of list of TODOs for the actix ecosystem right now?
![andthen actix block andthen actix block](https://regmedia.co.uk/2020/01/21/techempower.png)
Thank you, Nikolay! I think it was just a misunderstanding of tone. It is fixed, Actix-service 1.0.5 is released. Why the hostility though? I know it's hard over text/internet/GitHub but I'm coming from a place of wanting this project to succeed.īoring, because nobody actually wants to fix existing code, everyone just want to remove unsafe. The point of this is to first see how easy (or hard) it is to make the app fully non-blocking. Next stage will be deleting organization. The first step will be to asyncify the handlers in the old Actix 0.7 application and then we’ll move the whole app to Actix 1.0.
ANDTHEN ACTIX BLOCK PATCH
Issue #83 contained some pretty good discussion surrounding unsafe rust and I don't think we should ignore or delete a constructive please please please can we try not to use phrases like "this patch is boring"? < JohnTitor commented on I understand your point, but that doesn't mean you should use offensive words. You do not respect semver, you do not respect soundness, so why are you using a language predominantly based around doing these things right?
![andthen actix block andthen actix block](https://styles.redditmedia.com/t5_1t1clq/styles/profileIcon_snoo23ff2723-1480-4282-a999-741babc4fc05-headshot-f.png)
< bbqsrc commented on seriously? Please just stop writing Rust.
ANDTHEN ACTIX BLOCK LICENSE
Presumably this requires benchmarking/more exhaustive testing which I don't have time to do, but if someone wants to take the patch and get it merged feel free (I license it under Apache-2.0 OR MIT, though I don't consider it to be creative enough to be copyrightable). = note: inside call to `main` at /Users/nemo157/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libstd/rt.rs:67:34īecause at this point there exist two independent &mut (First, Second) on the stack referencing the same tuple.Īs a PoC this patch applied to actix-net passes all tests, and when the second playground is run against it under Miri it soundly fails with thread 'main' panicked at 'already borrowed: BorrowMutError' from within the AndThenServiceResponse. = note: inside call to `block_on::>` at src/main.rs:47:5 = note: inside call to ` as core::future::future::Future>::poll` at src/main.rs:55:35 = note: inside call to `> as actix_service::Service>::call` at src/main.rs:36:18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Miri evaluation error: not granting access to tag because incompatible item is protected: because incompatible item is protected: It is possible to obtain several mutable references to the same memory location by calling this function repeatedly: This uses Rc::as_ref() to obtain a reference to the underlying data, which does not guarantee uniqueness.
![andthen actix block andthen actix block](https://user-images.githubusercontent.com/33961674/62932519-d4b6dd00-bdf2-11e9-9367-6de79361b018.gif)
ANDTHEN ACTIX BLOCK CODE
There is no repeated call to get_mut() anywhere in code These two references do not need to exist in the same function to trigger undefined behavior, they only need to exist at the same point in time.Ī proper way to implement Cell:get_mut() would be calling Rc::get_mut() which guarantees uniqueness instead of Rc::as_ref(). This may lead to arbitrary memory errors triggered from safe code, the most common of which would be use-after-free. get_mut() // obtained a second mutable reference UB starts here map_err(Error::from) // <- convert SendRequestError to an Error send() // <- connect to host and send request / Stream client request response and then send body to a server response I'm really confused because this is a sample code from the actix-web examples! extern crate actix Ĭlient, middleware, server, App, AsyncResponder, Body, Error, HttpMessage, I would like to use actix-web as a simple proxy server, but when I'm using huge files in streaming mode, the server has a timeout error and only a small part of the file will be downloaded.