Re: [sqlite] How lock is implemented upon write?

2019-07-03 Thread Peng Yu
As I said in my original message "I am trying to understand how lock is implemented in sqlite3". On 7/2/19, Keith Medcalf wrote: > > On Tuesday, 2 July, 2019 13:26, Peng Yu : > >>I not sure how to use os_unix.c. Are there any easy to follow >>examples in python? > > YOU do not use os_unix.c.

Re: [sqlite] How lock is implemented upon write?

2019-07-03 Thread Jens Alfke
> On Jul 3, 2019, at 10:59 AM, Peng Yu wrote: > > As I said in my original message "I am trying to understand how lock > is implemented in sqlite3". No offense, but I don’t think it’s reasonable to ask people to port code to Python just so you can figure out how it's implemented. If you’re

Re: [sqlite] How lock is implemented upon write?

2019-07-03 Thread Keith Medcalf
On Wednesday, 3 July, 2019 11:59, Peng Yu wrote: >As I said in my original message "I am trying to understand how lock >is implemented in sqlite3". from os_unix.c: /* The following describes the implementation of the various locks and ** lock transitions in terms of the POSIX advisory

Re: [sqlite] How lock is implemented upon write?

2019-07-03 Thread Peng Yu
Something in a higher level language (e.g., Python) that is easy to run maybe better. Or at least some stand-alone C code (compilable to executables) that is solely for the purpose of demonstrating the locking mechanism. The descriptions in os_unix.c don't satisfy these conditions. Just based on

Re: [sqlite] How lock is implemented upon write?

2019-07-03 Thread Jens Alfke
> On Jul 3, 2019, at 6:20 PM, Peng Yu wrote: > > Something in a higher level language (e.g., Python) that is easy to > run maybe better. Or at least some stand-alone C code (compilable to > executables) that is solely for the purpose of demonstrating the > locking mechanism. After you figure