On 9/15/05, Mark Wyszomierski <[EMAIL PROTECTED]> wrote:
> 
> app1:
> SomeThread()
> {
> sqlite3 *db = opendatabase();
> writesomestuff();
> PostMessage(my_other_app, 0, 0);
> closedatabase(db);
> return 0;
> }


I don't believe this is will work. The message is put in a queue and control 
returns
to the original thread. The database is then closed. There is no timing 
guarantee on
the posted message delivered to your other app. Most likely it's delivered 
after
the database is closed when the thread does something that causes windows
to time slice.

Sharing environments across threads is probably not a good idea.

---
The Castles of Dereth Calendar: a tour of the art and architecture of 
Asheron's Call
http://www.lulu.com/content/77264

Reply via email to