Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ÝPf\ ã@sPddlmZddlZddlZddlmZmZmZmZm Z m Z Gdd„deƒZ dS)é)Úabsolute_importNé)ÚLockBaseÚ LockFailedÚ NotLockedÚ NotMyLockÚ LockTimeoutÚ AlreadyLockedc@s:eZdZdZd dd„Zdd„Zdd„Zd d „Zd d „ZdS)Ú LinkLockFilez�Lock access to a file using atomic property of link(2). >>> lock = LinkLockFile('somefile') >>> lock = LinkLockFile('somefile', threaded=False) NcCs"yt|jdƒjƒWn"tk r6td|jƒ‚YnX|dk rD|n|j}tjƒ}|dk rj|dkrj||7}x²ytj|j|j ƒWn”t k �rtj |jƒj }|dkr¬dS|dk ròtjƒ|kròtj |jƒ|dkrätd|jƒ‚ntd|jƒ‚tj|dk �r |d�p dƒYqlXdSqlWdS) NÚwbzfailed to create %sréz&Timeout waiting to acquire lock for %sz%s is already lockedé gš™™™™™¹?)ÚopenÚ unique_nameÚcloseÚIOErrorrÚtimeoutÚtimeÚosÚlinkÚ lock_fileÚOSErrorÚstatÚst_nlinkÚunlinkrÚpathr Zsleep)ÚselfrZend_timeZnlinks©rú"/usr/lib/python3.6/linklockfile.pyÚacquires0   $zLinkLockFile.acquirecCsP|jƒstd|jƒ‚ntjj|jƒs4td|jƒ‚tj|jƒtj|jƒdS)Nz%s is not lockedz%s is locked, but not by me) Ú is_lockedrrrÚexistsrrrr)rrrrÚrelease7s  zLinkLockFile.releasecCstjj|jƒS)N)rrr!r)rrrrr ?szLinkLockFile.is_lockedcCs(|jƒo&tjj|jƒo&tj|jƒjdkS)Nr )r rrr!rrr)rrrrÚ i_am_lockingBszLinkLockFile.i_am_lockingcCstjj|jƒrtj|jƒdS)N)rrr!rr)rrrrÚ break_lockGszLinkLockFile.break_lock)N) Ú__name__Ú __module__Ú __qualname__Ú__doc__rr"r r#r$rrrrr s  &r ) Z __future__rrrÚrrrrrr r rrrrÚs