shared server counter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron Lind

    #1

    shared server counter

    If you have custom counter on a server that will spit out unique
    numbers on demand such as:

    private shared reportIDnumber as long

    Private Shared Function ReturnReportID( ) As Long
    reportIDnumber += 1
    Return reportIDnumber
    End Function

    Doesn't this type of function need to be explicitly locked in order to
    make sure that two seperate threads don't end up with the same ID? If
    so what is the best method, a mutex or something else?

    Thanks for any help on the matter.

    AJL
Working...