On 9/14/06, Jacob Atzen <[EMAIL PROTECTED]> wrote:
> How do I get Mongrel to use Mutex?
In your mongrel/rails.rb, right at the beginning:
require 'sync'
Comment that out and add
require 'thread'
Use the thread lib I sent to you, as it should fix the problem that
caused Zed to want to switch from Mutex to Sync in the first place.
Then, just below that, in this code:
class RailsHandler < Mongrel::HttpHandler
attr_reader :files
attr_reader :guard
@@file_only_methods = ["GET","HEAD"]
def initialize(dir, mime_map = {})
@files = Mongrel::DirHandler.new(dir,false)
@guard = Sync.new
That last line, comment it out and add:
@guard = Mutex.new
Then try your test again and see if you can reproduce that mode of failure.
Kirk Haines
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users