I think, if you do that, then you'll get an error that there's no semaphore with a handle of 0 when you call SignalSemaphore().
However, what should work is to create a third semaphore where you're not bothered whether the count is incremented or not. You can then set your global variable to this ...
Search found 4 matches
- Fri Sep 02, 2016 7:45 pm
- Forum: Coding Questions
- Topic: Calling SignalSemaphore()'s during PauseThread()
- Replies: 5
- Views: 1394
- Fri Sep 02, 2016 4:40 pm
- Forum: Coding Questions
- Topic: Calling SignalSemaphore()'s during PauseThread()
- Replies: 5
- Views: 1394
Re: Calling SignalSemaphore()'s during PauseThread()
I'm not entirely sure from the question whether the calls to SignalSemaphore() are in the thread procedure itself or in your other code.
If it's the former, then calling PauseThread() is the best solution since it will clearly prevent any calls to SignalSemaphore() during the period of suspension ...
If it's the former, then calling PauseThread() is the best solution since it will clearly prevent any calls to SignalSemaphore() during the period of suspension ...
- Fri Sep 02, 2016 12:07 pm
- Forum: Coding Questions
- Topic: List or Array or Map - how do I ..
- Replies: 3
- Views: 1154
Re: List or Array or Map - how do I ..
Try something like this to split the string into an array - the code for lists or maps should be similar:
Define.s str = "string1$ ---- string2$ ---- string3$ ----"
str = Left(str, Len(str) - 5)
Define.s sep = " ---- "
Define.i count = CountString(str, sep)
Define Dim arr.s(count)
Define i.i
For ...
Define.s str = "string1$ ---- string2$ ---- string3$ ----"
str = Left(str, Len(str) - 5)
Define.s sep = " ---- "
Define.i count = CountString(str, sep)
Define Dim arr.s(count)
Define i.i
For ...
- Wed Aug 31, 2016 10:40 am
- Forum: Announcement
- Topic: Spam/fraud from "user" purebot?
- Replies: 13
- Views: 8111
Re: Spam/fraud from "user" purebot?
I've just had a PM from 'Ered', who apparently is the latest member of the forum, offering me PureBasic 5.55 and new SpiderBasic!
It looks like he or she may be targeting new members.
Needless to say I assumed it was a phishing attack and haven't clicked on the links given.
It looks like he or she may be targeting new members.
Needless to say I assumed it was a phishing attack and haven't clicked on the links given.