Re:Celery, non-blocking code and quest against coroutines
by markbnj on Thursday June 09, 2016 @09:21AM
(#11869155)
The title is off I agree, it's not like Celery fixes cpython's problematic data structures. I don't think it was a bad article, though.
[ Parent
| on HN ]
Re:Celery, non-blocking code and quest against coroutines
by forgottenpass on Thursday June 09, 2016 @09:33AM
(#11869234)
I wouldn't have minded reading someones process of learning a new design pattern if it wasn't asserting so many things that are silly or flat out wrong during the process. That's why I originally wrote, "this is a bad article." I edified that bit out because it detracts from my point unless I take the time to go through and fisk the article.
Re:Celery, non-blocking code and quest against coroutines
by mdomans on Thursday June 09, 2016 @09:40AM
(#11869279)
Well, I'm more about advertising the lockless programming pattern :)
Point out the silly, please, I like it when someone actually makes honest effort to teach me something.
Re:Celery, non-blocking code and quest against coroutines
by scott_s on Thursday June 09, 2016 @10:15AM
(#11869496)
The title, mainly. Most readers will take that to mean that you fixed the GIL itself - that is, removed it - rather than are presenting a pattern that avoids it. Your title sets up an adversarial relationship with such readers, because their attitude when they start is going to be "no, you didn't", which will cause them to miss your actual message.
Re:Celery, non-blocking code and quest against coroutines
by mdomans on Thursday June 09, 2016 @11:09AM
(#11869873)
Fair point.
Re:Celery, non-blocking code and quest against coroutines
by theseatoms on Thursday June 09, 2016 @09:53AM
(#11869353)
I'm curious.. in what way are cpython's data structures problematic? Do you just mean as they relate to the GIL design choice, and the downsides/limitations that follow from the overall design?
Re:Celery, non-blocking code and quest against coroutines
by coldtea on Thursday June 09, 2016 @10:12AM
(#11869480)
He probably means the internal datastructures of Python the language (interpreter), not the datastructures it exposes to the user (list, map, tuple, etc).
Re:Celery, non-blocking code and quest against coroutines
by mdomans on Thursday June 09, 2016 @10:42AM
(#11869675)
Yup. If you don't have to care about thread safety on API level, e.g. list, problems such as what's going on currently in gilectomy are no longer yours.
Re:Celery, non-blocking code and quest against coroutines
by DasIch on Thursday June 09, 2016 @11:55AM
(#11870218)
The GIL has atomic bytecodes as a side effect and this assumption has become part of the API.
There is nothing on the datastructure side that can be done to "fix" this.
In any case memory access should be considered a memory management problem just like allocating and freeing memory is. It needs to be solved on the language level to create sufficiently high level user experience.
You can only do that if you're willing to do things very differently such as Rusts Ownership/Borrowing approach.