Comments (12)
This is also a problem for python-adblock
. Upgrading PyO3 from 0.10
to 0.11
makes the build fail due to thread-safety issues. See https://github.com/ArniDagur/python-adblock/actions/runs/151271594.
from adblock-rust.
I don't have a good way to test this, as adblock-rust
isn't really used in a multithreaded context in Brave. However, I would be happy to look at PRs for this.
from adblock-rust.
It's worth noting that the library used to be thread safe, but this was changed in 19ac71a for apparent performance reasons.
@AndriusA Would you be fine with reverting the aforementioned commit?
from adblock-rust.
@antonok-edm What do you think?
from adblock-rust.
@ArniDagur it's actually been discussed before - see #101 (comment). Ultimately it seems like the gains from thread-unsafety are more hassle than they're worth, so I would support rolling that change back.
from adblock-rust.
I'll make a PR.
EDIT: #130
from adblock-rust.
Should be fixed by #130. @wavenator if this doesn't work for you feel free to follow up.
from adblock-rust.
Thanks a lot for all the effort!
from adblock-rust.
This package is still not thread safe even with the rollback. Related discussion: https://stackoverflow.com/questions/63761408/rust-rocket-pass-variable-to-endpoints
from adblock-rust.
Yeah, you have to disable the object-pooling
feature. That worked for me at least. Sorry for the confusion.
from adblock-rust.
Yeah, you have to disable the
object-pooling
feature. That worked for me at least. Sorry for the confusion.
Can you tell me how to disable object-pooling
? I never touched Rust before and I'm stuck here. Thank you.
from adblock-rust.
@ciokan When you add a dependency in your Cargo.toml
file, rather than just giving a version number you can specify more information, including a list of "features". Here, you'll also want to disable default features, since object-pooling
is on by default. This crate's supported features are all listed under [features]
in this repo's Cargo.toml
.
In your case you could add a new section that might look something like this:
[dependencies.adblock]
version = "0.3.2"
default-features = false
features = ["full-regex-handling", "embedded-domain-resolver"]
Or if you prefer, you can equivalently specify the whole dependency inline under the usual [dependencies]
section like this:
[dependencies]
adblock = { version = "0.3.2", default-features = false, features = ["full-regex-handling", "embedded-domain-resolver"] }
from adblock-rust.
Related Issues (20)
- Convert $all to $doc like uBO HOT 1
- support AdGuard scriptlet syntax HOT 1
- Will adblock-rust continue to work after Chrome Manifest V3? HOT 3
- `:style()` action operator doesn't work great with some `::-webkit-*` pseudo-classes, if other pseudo classes are used/need in the same rule.
- Support for `$specifichide`
- YouTube blocks default Brave now HOT 2
- Ag filters support of Brave Shields.
- Copyright confusion HOT 9
- Investigate using upstream `url` parser
- uBlock filter not working on Brave, works on Firefox + uBlock HOT 2
- Missing `from` support on `content_blocking.rs` causes crashes
- Wrong types for js bindings HOT 2
- Dependency Dashboard
- Return all filters which blocks the request HOT 1
- Allow specific YouTube channels with the AdBlock HOT 2
- crate.io website doc license tag needs an update HOT 1
- `remove-attr`/`remove-class` regex/quoted syntax HOT 3
- `$to` support
- Element hiding rules (cosmetic filters) do not work with regex
- `removeparam` with no resource types should only apply to document, subdocument, and XHR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adblock-rust.