If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
void wxThreadEvent::SetPayload ( const T & payload ) [inline]
Sets custom data payload.
The payload argument may be of any type that wxAny can handle (i.e. pretty much anything). Note that T's copy constructor must be thread-safe, i.e. create a copy that doesn't share anything with the original (see Clone()).
does wxAny handle resultsets from wxSQLite3?
wxSQLite3ResultSet define a copy constructor, but I'm not sure it's thread safe. Looking to the sources :
jfouche wrote:
EDIT : But don't use the result after you posted it in another thread, because the copy of the result set will set the statement to NULL.
I don't understand that! What do you mean by "don't use the result after you posted it in another thread"
Chief Justice: We have trouble dear citizens! Citizens: What it is his honor? Chief Justice:Our president is an atheist, who will he swear to?
If you post this event from the thread A to the main thread, there will be a copy of the resultset class. If you copy it, the sqlite statement will be available in the new class (eg : in the event). The resultset will be empty in the thread A : you can't use it anymore.
jfouche wrote:If you post this event from the thread A to the main thread, there will be a copy of the resultset class. If you copy it, the sqlite statement will be available in the new class (eg : in the event). The resultset will be empty in the thread A : you can't use it anymore.
Thanks everybody,
I just made it! Your posts have helped me and I have learned a lot from you guys. Here is Codelite project with all files I was tinkering with. I hope someone will brush the code well and post to Wiki(there is no wxThreadEvent working example)