Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Non Blocking Lock [Support Thread]

    Non Blocking Lock
    Non Blocking Lock (LOCK) provides a non-blocking method for developers to obtain locks on shared resources (across multiple processes / threads).


    Features
    • Non blocking methods for obtaining and releasing locks
    • Timeouts can be configured and renewed for locks
    • Automatically releases acquired locks when the PHP process ends


    Requirements
    • Working installation of Zen Cart 1.5.x
    • FTP access to the Zen Cart installation (Secure FTP is recommended)
    • A account to access Zen Cart's administrative interface (super user is recommended)
    Last edited by lhungil; 12 Dec 2014 at 05:24 AM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,870
    Plugin Contributions
    96

    Default Re: Non Blocking Lock [Support Thread]

    Sound intriguing, lhungil. Would you give an example of a scenario where this would be used?

  3. #3
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Non Blocking Lock [Support Thread]

    Some Exaples: Generating a cache (generated content such as images, category listings, and product listings), theme optimization (LESS pre-processing, minify, compress etc), avoiding race conditions wih longer running blocks of code (such as check, generate, update), only allowing one "click" (or download) at a time, and the list goes on. Basically anytime one wants only a single process performing a task at the same time (or accessing a particular shared resource).


    The code uses the database to maintain lock information (works cross platform) and when available uses MEMORY tables for performance reasons). By not blocking, the executing code continues running and can perform other tasks (and optionally attempt to acquire the lock later). One can also code a loop to check and sleep if not available (blocking while waiting for a lock).


    I am currently working on a new Zen Cart module and needed the ability to work with Non Blocking Locks. I decided some other modules (old and new) could potentially benefit from the locking code, so added some abstraction and decided to release the locking code as a standalone module.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. ZX Slideshow support thread
    By balihr in forum All Other Contributions/Addons
    Replies: 766
    Last Post: 18 Oct 2025, 11:23 AM
  3. BackUp ZC [Support Thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 285
    Last Post: 23 Dec 2020, 10:40 AM
  4. Wordpress On ZC [Support Thread]
    By hira in forum All Other Contributions/Addons
    Replies: 1858
    Last Post: 17 Jan 2014, 01:24 AM
  5. ZJ Black 2 support thread
    By Liamv in forum Addon Templates
    Replies: 1
    Last Post: 15 Feb 2010, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg