#22 ✓resolved
josh

Lock/Mutex middleware

Reported by josh | January 15th, 2009 @ 08:07 PM | in 1.0

Rack::Lock provides a nice way to wrap your application in a mutex (or other lock) if it is not threadsafe.

Comments and changes to this ticket

  • Ryan Tomayko

    Ryan Tomayko January 15th, 2009 @ 09:00 PM

    +1

    This is a clean and elegant way to limit specific segments of middleware/apps to a single thread while allowing the rest of the middleware pipeline to serve requests in with multiple threads.

    A specific case would be allowing Rack::Cache to serve cache hits from multiple threads in front of an app that was limited to a single-thread:

    
    use Rack::Cache
    use Rack::Lock
    run myapp
    

    Moving the Rack::Lock middleware up or down in the chain lets us control specifically where a threaded app synchronizes.

    The patch looks great, too.

  • josh

    josh January 17th, 2009 @ 03:34 PM

    • Milestone changed from 0.9 to 1.0
    • State changed from “new” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Attachments

Pages