GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add itertools.chain.__setstate__ by nonzerofloat · Pull Request #3779 · RustPython/RustPython Conversation
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Generally git do not allow commits without an email registered. That's perhaps because the commit's email is not consistent with my account's email. I have fixed. Correct lint errors. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| impl IterNextIterable for PyItertoolsChain {} | ||
| impl IterNext for PyItertoolsChain { | ||
| fn next(zelf: &Py<Self>, vm: &VirtualMachine) -> PyResult<PyIterReturn> { | ||
| let iterables = zelf.iterables.read(); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This change may cause dead-lock
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you give me more detailed explanation for deadlock? I suspect the place is suitable. Deadlock is unexpected.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Guess we have a chain with self-editing iterable on __iter__. Previously, we locked iterable only before and after get_iter, it is safe.
After change, this line will hold the lock for entire loop. Any write operation in get_iter will be permanently blocked.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The implementation of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Oh, this is done in #4232 Thanks @dannasman ! And thank you for contributing @nonzerofloat |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| fn setstate(&self, state: PyTupleRef, vm: &VirtualMachine) -> PyResult<()> { | ||
| let args = state.as_slice(); | ||
| if args.is_empty() { | ||
| let msg = String::from("function takes at leat 1 arguments (0 given)"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
leat should be least.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.