Is wxString threadsafe? Topic is solved

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.
Post Reply
orbitcowboy
I live to help wx-kind
I live to help wx-kind
Posts: 178
Joined: Mon Jul 23, 2007 9:01 am

Is wxString threadsafe?

Post by orbitcowboy » Fri Feb 26, 2010 8:27 am

Hi all,

does anybody know if wxString is threadsafe?

A quick form search brought leaded to following thread:

http://forums.wxwidgets.org/viewtopic.p ... threadsafe

But i could not find anything in the wxString class reference about thread safety:

http://docs.wxwidgets.org/stable/wx_wxs ... l#wxstring

Thanks in advance

Orbitcowboy
OS: Ubuntu 9.04 (32/64-Bit), Debian Lenny (32-Bit)
Compiler: gcc/g++-4.3.3 , gcc/g++-4.4.0
wxWidgets: 2.8.10,2.9.0

User avatar
doublemax
Moderator
Moderator
Posts: 14768
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Post by doublemax » Fri Feb 26, 2010 9:46 am

No, wxString is not thread-safe.
Use the source, Luke!

DavidHart
Site Admin
Site Admin
Posts: 3967
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Fri Feb 26, 2010 9:51 am

Hi,

A better thread would have been http://forums.wxwidgets.org/viewtopic.php?t=22048.

As normally used, wxString isn't thread-safe. In wx2.9 there is a workaround in the wxString::Clone function.

Regards,

David

Post Reply