View Single Post
  #25 (permalink)  
Old May 23rd, 2002
tshdos tshdos is offline
Gnutella Veteran
 
Join Date: March 24th, 2002
Location: Virginia
Posts: 101
tshdos is flying high
Default

It looks like the reason it froze up is because you have functions that exit without unlocking the application ie:

Function asdf
Application.Lock

If A ="" Then
' should be an application.unlock here
Exit Function
End If

...

Application.Unlock
End Function


The reason for the locks is to keep the counts correct.
An example would be if two clients hit the following line at the same time.
Application("count") = Application("count") + 1
If you assume Application("count") = 0 before they hit this line two things could happen. Either it will work fine and the count will
be 2 or when both clients get the value of count before adding one they both get the value 0 in which case both clients set the count to 1. Honestly if you are not going to get a lot of hits at the same time you don't really have to worry about this, but it doesn't hurt performance if done correctly. You only need to when updating really.

Quote:
I said in the readme that you should change the
default values due security measures.
I did not notice the line said '// Change default values.
But you should probably set the default to something besides 1 since most of the other functions use a 1. Just some advice though.
Reply With Quote