Back to the thread safe string conversation...

Just starting out? Need help? Post your questions and find answers here.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Back to the thread safe string conversation...

Post by Karbon »

Just a quick question here..

All the "strings aren't thread safe" conversation I've seen has been in reference to a thread changing a global string variable. It is safe to use strings in threads if you create and use them *only* in that thread - right?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Re: Back to the thread safe string conversation...

Post by Doobrey »

AFAIK, PB only has one string buffer for performing string calculations. So it`s possible that a thread could access and modify it before the main app or other thread has finished using it.
What PB really needs is a string buffer for each thread.
Last edited by Doobrey on Mon Sep 15, 2003 12:32 am, edited 2 times in total.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Ahh hell. That's not good at all... Daaaaaamn.
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Post by Doobrey »

@Karbon,
Well I did say "AFAIK"..Normally at this point Tinman pops in and proves me wrong :wink:
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Gotcha :-)

*Yells for Tinman*


Thanks!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2148
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

Tinman is currently very busy with his work, new home, etc.
So he isn't on the forum this weeks...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply