Comments (5)
Sure! Release CI is running for 0.6.3 now.
from nlprule.
Hi, thanks for the issue. Refreshingly, something which I couldn't have foreseen :)
I believe the easiest fix is just to replace lazycell
with once_cell
, which is a more well used dependency anyway and has the get_or_init
API which fits our use case.
I went ahead and implemented this: #69. Can you check if this solves the problem? Binaries from the latest release should still work.
from nlprule.
A bit of context:
Rules::suggest(...)
is called in parallel over a shard immutable reference to a single &Rules
instance. Looking into lazycell
the ordering semantics look ok from the first glance, the API usage just seems incorrect (even in their example).
If thread A calls borrow()
while thread B is just about to write the value to the UnsafeCell
, it will be in LOCK
state, which will return a None
.
The only way I can think of doing this correctly is calling borrow()
repeatedly in the else
case until it succeeds.
from nlprule.
Just had a peek into the once_cell
crate, and there is a significant amount of non trivial synchronization logic happening, but I ran it a few times and it works consistently 🎉 - so #69 is good to go :) Thanks for the fast turnaround 👍
from nlprule.
Could you craft a release, that's the last thing pending for a cargo-spellcheck 0.8.0 which is again needed for paritytech/parity-bridges-common#832
from nlprule.
Related Issues (20)
- Token as returned by pipe() is relative to the sentence boundaries HOT 6
- Improve loading speed (of regex?) - cli usecase HOT 13
- Usability of the rules API degraded from 0.4.6 to 0.5.1 HOT 1
- oob access since 0.5.3 HOT 6
- Support for older glibc HOT 8
- Grammar check fails HOT 3
- Compile error in build.rs from README.md HOT 3
- Support Rules written in Rust HOT 1
- Coalesced words - tokenization HOT 1
- Readme link to languagetool HOT 1
- Support for AnnotatedText HOT 10
- Clarify license statement HOT 5
- Document how to load custom rulesets HOT 4
- Support distinguishing between grammar and style errors HOT 3
- Be more responsible about network requests HOT 2
- Single Or Pural
- Support python 3.11
- project dead? HOT 1
- Performance for German?
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 nlprule.