In my current C#/NET 3.5 application, I have a task queue (thread safe) and I have 5 worker threads that has to constantly look for tasks in the queue. If a task is available, any one worker will dequeue the task and take required action.
My worker thread class is as follows:
public class WorkerThread
{
//ConcurrentQueue is my impl...
Slight problem i have been pondering on, i have a class that loads a text from a url as a means to sync the time.
The swf file can be on the same page multiple times, but i want it to check to see if one of the swf is sync'ing, if so then wait for it to complete and load its sync'd value (rather then query the url itself), so that they ...
I'm just learning java, and I find that the java docs/books put a strong emphasis on synchronization. I have read quite a bit of c# docs/books, and you just don't see that much emphasis on this topic.
Does c# handle locking/sychronization differently, or do things work differently as a web application (application pools, iis, clr verus...
I need to synchronize two databases.
Those databases stores same semantic objects but physically different across two databases.
I plan to use a DTO Pattern to uniformize object representation :
DB ----> DTO ----> MAPPING (Getters / Setters) ----> DTO ----> DB
I think it's a better idea than physically synchronize using SQL Query on e...
What is the difference between semaphores and mutex provided by pthread library ?
...
I just want to do a simple, though thread-safe, boolean test (and set)
so:
if(myBoolean==false) //should not lock/wait!
{
myBoolean=true;
.....
}
else
{
....
}
I considered the following (although possibly incorrectly, so please correct me where I misunderstood)
using the Lock { if(myBoolean)... } construct seems ...
The data will be kept on a server and on a client, say a desktop app. Clients will have a local "cache" and this is editable.
Use cases:
- The server side copy is edited, send to clients.
- The client side copy is edited, send to server.
I am thinking of giving the information an incremental value. Each time an edit takes place, it i...
How to wait and notify like in Java In C/C++ for shared memory between two or more thread?I use pthread library.
...
Consider a LOB site, where users work on a large shared dataset.
Using Wcf Data Services on the server side and the DataContext and DataView from the AJAX 4.0 client library on the client side to enable CRUD operations.
Getting the data on the initial load is straight forward, just query the server and display the data (in a table for e...
We typically deploy our software applications to our clients using Subversion (svn update on the clients; unidirectional). We're currently experiencing problems with one of our clients because of the high latency (large file download speeds are good) because they are in China and our server is in Canada. Subversion simply times out with ...
Hi,
I have heard that there are different levels of Synchronization.are there?(If there are ,would you please explain them with a snippet code?)thanks.
...
Hi,
would you please explain more about the meaning of synchronization?
...
I know that the .NET memory model (on the .NET Framework; not compact/micro/silverlight/mono/xna/what-have-you) guaranteed that for certain types (most notably primitive integers and references) operations were guaranteed to be atomic.
Further, I believe that the x86/x64 test-and-set instruction (and Interlocked.CompareExchange) actuall...
I am working on .NET ClickOnce project that uses Sql Server 2005 Compact Edition to synchronize remote data through the use of a Merge replication. This application has been live for nearly a year now, and while we encounter occasional synchronization errors, things run quite smoothly for the most part.
Yesterday a user reported an err...
Ok, let's see if you Wizards can help me with this problem I'm banging my head against.
The scenario is a pretty standard setup with a point of sale (that's where I am) and a backoffice keeping track of warehouse information. The problem is that I need to synchronize the database at the point of sale with the current stock information f...
Hello,
I am running test but I want to run 2 functions at the same time. I have a camera and I am telling it to move via suds, I am then logging into the camera via SSH to check the speed the camera is set to. When I check the speed the camera has stopped so no speed is available. Is there a way I can get these functions to run at the s...
I've got a database on my server which is about 3mb big. I'd like to ship that with my iphone application.
The most important thing is that I'd like to promote changes to the database (insert, updates, deletes) to the iphone. What's the best way of doing that? I mean - what is necessary on
- the server
- the client (= iphone)
- between;...
Hey guys,
My situation is like this:
I got a windows computer and a Linux computer , and an Eclipse project I'd like to sync between them. What is the best way to do this ?
Thanks in advance
...
Hi there,
I've 2 computers connected to Internet. Each one has Xampp installed, with a local mysql database.
Is it possible to sychronize these 2 dbs ?
I use Navicat. The sync works well with a local database to a server database, using tunneling. But what about the sync between 2 PCs dbs ?
Thank you very much for your help,
Cheer...
I know that using the synchronize keyword before a method brings synchronization to that object.
That is, 2 threads running the same instance of the object will be synchronized.
However, since the synchronization is at the object level, 2 threads running different instances of the object will not be synchronized. So, if we have a static ...