473,396 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Jul 21 '05 #1
0 1135

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: jeff brubaker | last post by:
Hello, Currently we have a database, and it is our desire for it to be able to store millions of records. The data in the table can be divided up by client, and it stores nothing but about 7...
0
by: Shiraz | last post by:
Hi I have a question regarding the functionality of merge modules. Since this relates to my previous queries, I'll just give you a brief background on the topic. I had to make an installer for...
3
by: Kian Goh | last post by:
Hi, Can somebody tell me why can't I use string strPath = Server.MapPath(Request.ApplicationPath); in protected void Application_Start(...) It compiles ok but an unhandled exception occurred...
3
by: Ford Prefect alias Armin | last post by:
Hello I use SHARED Sub's and Functions to access Data from all running Sessions. I use the KeyWord Shared in the Functions of the Class. This is working fine.. an I can share Data between...
1
by: Brian Henry | last post by:
When you say shared in vb what does it exactly mean... the other languages use static in the same place of this in .NET here is an example Public Shared Event Idle As EventHandler Shared =...
0
by: Aaron Lind | last post by:
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...
7
by: Carsten H. Pedersen | last post by:
Hello I want to create a kind of shared object. I have created a class, Counter, which you can then import. Through the Counter class, i would like to have access to a shared object. Lets say...
18
by: jess.austin | last post by:
hi, This seems like a difficult question to answer through testing, so I'm hoping that someone will just know... Suppose I have the following generator, g: def f() i = 0 while True: yield...
1
by: will_456 | last post by:
Is there a way of checking whether a file has a shared file attribute. And then can you change it to unshared. I can't use my program to make a copy of a file because it produces an error....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.