Pavel Ivanov wrote:
>> Hell if I know why they use fcntl() for locks, and don't even give
>> you the option to block.
>>     
>
> I think because they need to detect dead locks. BTW, I believe in case
> of dead lock even busy_handler will not be called, just SQLITE_BUSY is
> returned...
>   
    I guess that makes sense, in cases where multiple tables are involved.

>>    I think we are a long way from me screwing around with sqlite's
>> source. What I'm trying for is a solution with my own source code.
>>     
>
> Then neither flock() nor fcntl() will not help you. Your own code have
> control only over the busy handler which gains control only when
> database is locked. And it should understand somehow when other
> process not calling any busy handlers unlocks database... And I
> believe there's no solution here any better than simple
> sleep-and-retry.
>   

    How does this preclude me from coming up w/my own lock file with
POSIX locks? If a bunch of process start making incompatible requests on
a single lock file, then they'll be queued and processed in order. I
don't see how you can have a deadlock when you have multiple processes
putting locks on a single, entire file.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to