Re: [ANN] Thin 0.5.3 Purple Yogurt release
- From: "s.ross" <cwdinfo@xxxxxxxxx>
- Date: Sat, 19 Jan 2008 12:53:50 -0500
Oooooh, you're right. Unlock is called twice. This is code in a Rails
plugin, and I know that's no disclaimer of responsibility for its
working right. I still have to take responsibility for that. I'll let
the author know, but here's a follow-on question.
Assuming bad behavior on the part of the client code (in this case,
calling unlock twice), should this be rescued, the error logged, and
an attempt made to keep the server alive or should the process
terminate (as it currently does)?
I believe the intent was well-intentioned but that it doesn't prevent
concurrency issues cross-process and obviously provides no benefits in
a Rails process because Rails puts a great big mutex around the whole
request/response pipeline.
Thanks for looking into this.
--steve
On Jan 19, 2008, at 7:44 AM, Radosław Bułat wrote:
And even if it would be multi threaded it won't work. Every time
store_visits methods is executed new mutex is created, so there won't
be synchronization.
The reason for error message "ThreadError (not owner):
/vendor/plugins/sitealizer/lib/sitealizer.rb:80:in `unlock'
(...)
"
is that you call 'unlock' method twice. 'ensure' block is ok, so
remove previous calling (a the end of begin block).
--
Radosław Bułat
http://radarek.jogger.pl - mój blog
.
- References:
- [ANN] Thin 0.5.3 Purple Yogurt release
- From: Marc-André Cournoyer
- Re: [ANN] Thin 0.5.3 Purple Yogurt release
- From: s.ross
- [ANN] Thin 0.5.3 Purple Yogurt release
- Prev by Date: Re: Ruby with Mac OS X
- Next by Date: Re: Ruby with Mac OS X
- Previous by thread: Re: [ANN] Thin 0.5.3 Purple Yogurt release
- Next by thread: Re: [ANN] Thin 0.5.3 Purple Yogurt release
- Index(es):
Relevant Pages
|