atomic web server threads

Share your advanced PureBasic knowledge/code with the community.
tatanas
Enthusiast
Enthusiast
Posts: 275
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: atomic web server threads

Post by tatanas »

I didn't put any mutex in this example but I'm using them in my program.
A mutex for the SendNetworkString() is this example wouldn't fix the problem (there is only one Send and no competitive access).
Windows 11 Pro x64
PureBasic 6.30 x64
User avatar
idle
Always Here
Always Here
Posts: 6191
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: atomic web server threads

Post by idle »

I'll take a look in the morning if I get time.
User avatar
idle
Always Here
Always Here
Posts: 6191
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: atomic web server threads

Post by idle »

I don't see any issue with your test example on windows PB6.30 x64. The send in the thread doesn't crash it
tatanas
Enthusiast
Enthusiast
Posts: 275
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: atomic web server threads

Post by tatanas »

At the first start of the server there is no crash, SendNetworkString() return -1. But if you retry (stop/start the server), you should have a crash.
I'm not using TLS.
Windows 11 Pro x64
PureBasic 6.30 x64
User avatar
idle
Always Here
Always Here
Posts: 6191
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: atomic web server threads

Post by idle »

tatanas wrote: Thu Jan 29, 2026 7:59 am At the first start of the server there is no crash, SendNetworkString() return -1. But if you retry (stop/start the server), you should have a crash.
I'm not using TLS.
I can't get it to crash at all. :?
Post Reply