Hi,
When I browse SQLite amalgamation file sqlite3.c , I found the following
comment:
/*
** WinCE lacks native support for file locking so we have to fake it
** with some code of our own.
*/
#if SQLITE_OS_WINCE
typedef struct winceLock {
int nReaders; /* Number of reader locks obtained */
BOOL bPending; /* Indicates a pending lock has been obtained */
BOOL bReserved; /* Indicates a reserved lock has been obtained */
BOOL bExclusive; /* Indicates an exclusive lock has been obtained */
} winceLock;
#endif
and I also see some other functions in sqlite3.c that look like replacements
for LockFile(), UnlockFile() and LockFileEx().
Is there any problem with the existing LockFileEx() <
http://msdn.microsoft.com/en-us/library/ee489737.aspx > and UnlockFileEx()<
http://msdn.microsoft.com/en-us/library/ee490757.aspx >?
I am asking this because sometimes my WinCE application has a problem where
the changes made in one instance a of sqlite3 database not reflected in the
other instance b of the same database file even though they exist in the
same process.
Thread A:
initialize sqlite3 instance a
initialize sqlite3 instance b
Thread B:
modify via instance a
Thread A:
read via instance b
Thread B:
modify via instance a
Thread A:
close sqlite3 instance b
initialize sqlite3 instance b
read via instance b // the changes from a is sometimes not reflected
I fixed the above problem by using instance a for both Thread A and Thread B
since they are in the same process and hence eliminating instance b. but now
I plan open the same database from other process so I am a bit worried about
the concurrency in WinCE. I am using WinCE 6.
Thank you,
Afriza
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users