I've been doing some work on transactional memory and its viability for systems programming (databases, operating systems, servers, etc.). My own experience employing transactions, together with having seen how few communities use transactions in real code, has raised a question: What would convince you, a developer writing production co...
Is it possible to use fcntl() system call on a file to achieve thread/process synchronization (instead of semaphoress)?
...
I need some feedback on a threading problem that I am trying to solve.
The problem (this is coded as a winform application in C#)
I am comparing to lists which should be identical - if there is a discrepancy I popup a window and get the user to resolve the discrepancy by indicating which items are new and which items were deleted. The i...
Hello, I am loading an image to my silverlight application. This image will fit in a 3d model as a texture map. I need to fetch image attributes. For that I am using ImageOpened event, like this:
public MainPage()
{
BitmapImage img = new BitmapImage(new Uri("imagens/textura.jpg", UriKind.Relative));
img.ImageOpened...
What's the best strategy to keep all the clients of a database server synchronized?
The scenario involves a database server and a dynamic number of clients that connect to it, viewing and modifying the data.
I need real-time synchronization of the data across all the clients - if data is added, deleted, or updated, I want all the clien...
I understand that collections like the Hashtable are synchronized, but can someone explain to me how it works, and at what point(s) access is restricted to concurrent calls? For example, let's say I use some iterators like this:
Hashtable<Integer,Integer> map = new Hashtable<Integer,Integer>();
void dosomething1(){
for (Iterator<M...
var arguments = new double[] { 1d, 2d, 3d };
var result = arguments.Select(arg => Math.Sqrt(arg));
Now imagine a asynchronous method instead of Math.Sqrt (i'm not sure the method below is a true async method, but it behaves approximately like one)
public void BeginSqrt(Action<double> callback, double argument)
{
Thread.Sleep(100);...
I have a process A that contains a table in memory with a set of records (recordA, recordB, etc...)
Now, this process can launch many threads that affect the records, and sometimes we can have 2 threads trying to access the same record - this situation must be denied. Specifically if a record is LOCKED by one thread I want the other thr...
Hi all,
Experiencing intermittent issues, related to named events when processes are running in different user contexts: WaitForSingleObject (and WaitForMultipleObjects too) for such event handle fails with WAIT_FAILED (GetLastError returns 6 - Invalid handle value).
We have an application to schedule tasks on Windows machines under us...
Hi,
I have a application that uses LocalDataCache to synchronise a SQL Server 2008 Express database to a client database (.sdf file). This works great and I am now managing the conflicts.
I am using this Microsoft resource as a guide: How to: Handle Data Conflicts and Errors
The conflict I am particularly interested in is ConflictT...
Is there any way so that we can synchronize two independent processes? Like if they are sharing a resource, I would like to sync them.
I am using C#.
...
I am creating an application,in my app i am changing images for countdown.I want to play a Tick sound when one second completes(i mean when image changes).I have a 25 second long sound with repeated tick sound and within time interval of 1 second. sometimes it works fine but sometimes it's not.Now how do i sync audio with my timer.any he...
I have an issue at the moment where multiple (same schema) access 2003 databases are used on laptops.
I need to find an automated way to synchronize the data into a central access database.
Data on the laptops is only appended to so update/delete operations wont be an issue.
Which tools will allow me to do this easily?
What factors wi...
Can someone point me in the right direction for handling a PK conflict error in c# .net using Sync Framework.
I am trying to sync between sql server 2008 and local data cache database (.sdf) and would like to keep BOTH rows that are conflicting in both server and client and NOT allow either the server or client win?
I get a pk confli...
Dear all,
we have two threads accessing one list via a synchronized method. Can we
a) rely on the run time to make sure that each of them will receive access to the method based on the order they tried to or
b) does the VM follow any other rules
c) is there a better way to serialize the requests?
Many thanks!
...
Hi community!
I have a multithreaded Java code in which:
several threads read stateful objects from the synchronized shared storage (i.e. as a result of this, some threads may reference the same objects);
each thread then invokes a method process() and passes its object there;
process() processes objects in some way, which may result ...
Does anyone know of a Windows user-mode thread synchronization library for C++ (utilizing spin locks / atomic operations)? I only need mutexes (~critical sections), but condition variables would be a plus.
...
We have a set of actions or "Jobs" which we'd like to happen one at a time (not concurrently). Ie: Job A can't happen while B is happening, and you can't have two C jobs running at the same time.
In the event that a thread attempts to run a job concurrently they should get an error. We shouldn't just queue up the request.
Some jobs...
I am trying to create a windows mobile application that contains a database and can occasionally be connected to the Internet. When connected, I would like to sync the local database with the central database server. The central server is a MySQL server. The local database can be anything (probably SQL Compact).
What I did so far:
Ins...
I have written a com component in .NET and if I try to take a lock on any object in any method (that is invoked by unmanaged code talking to my com component) I get an exception.
I do not have the exact text of the exception at this moment but it wasn't much helpful either.
So my question is under what circumstances a lock(syncObject) ...