Re: SQLite3 and threads

2015-03-02 Thread Vitalie Colosov via Digitalmars-d-learn
Thanks for quick help. So this is related to Thread-local storage, which as I found it now, well documented, expected, and works as designed.

SQLite3 and threads

2015-03-01 Thread Vitalie Colosov via Digitalmars-d-learn
Hi, I am not able to query SQLite3 database files using threads; without threads it is working fine. I tried both etc.c.sqlite3 and d2sqlite3, and both seem to be facing the same issue: They stuck when executing a select query (using sqlite3_exec(...) for etc.c.sqlite3 or using

Re: SQLite3 and threads

2015-03-01 Thread Vitalie Colosov via Digitalmars-d-learn
After some analysis, it looks like related to the code parts which I have omitted for simplicity, and in particular - I was creating the query using global variable which was populated in main() function. It appears that when I spawn the function, it does not see the value of the global

Re: SQLite3 and threads

2015-03-01 Thread Vitalie Colosov via Digitalmars-d-learn
Now it all makes sense. Thank you. Maybe it would make also some sense if I would have gotten some kind of exception trying to access the variable which was not populated by the running thread, instead of successfully getting empty string... so this would be observed easily during the