Re: [ANN] Thin 0.5.3 Purple Yogurt release



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


.



Relevant Pages

  • Re: NEED HELP!!!
    ... press CTRL+ALT+DEL twice at the login screen ... your normal username and right click on it, choose 'unlock' ... // generated by anyweb, do not modify ... > Any suggestions on how to fix this problem? ...
    (microsoft.public.windowsxp.security_admin)
  • Locked Computer -- Cannot Unlock ??
    ... Twice in two days users have come to me first thing stating they cannot ... unlock their XP, SP2 workstations. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: BBC NEWS | Business | Ryanairs Eurostar claim banned
    ... it has twice as many rails! ... other airport shuttles? ... affair I once travelled on in Laon, which I think was called something like POMA 2000. ...
    (uk.railway)