Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms (1)

0
votes
0answers
22 views

multi-threading dining philospher issue

I am new to threading and in java . I wish to know whether my code will lead to any dead lock or not, if it leads to dead lock , i want to know where it is and how can i correct it. package ...
1
vote
1answer
40 views

Simple generic multithreaded queue

This is a simple thread safe queue that is used in a producer-consumer model. public class ThreadedQueue<TType> { private Queue<TType> _queue; private object _queueLock; ...
1
vote
1answer
53 views

Implementation of concurrent blocking queue for producer-consumer

I've implemented concurrent_blocking_queue for multiple-producers and single consumer. I intend it to block the producers as well, when the queue is full, which is why I set the capacity of the ...
2
votes
0answers
85 views

is this thread safe?

I am using this code for receiving log messages from my clients I receive more than 1000 connections per minute. I want to increase my log handling. I did with java threading. I have a doubt if it ...
1
vote
0answers
25 views

Funny multiple threads accessing public int from c# simple loop [migrated]

This is very funny... I would like to understand WHY exactly this is happening. public int numCounter; private void button2_Click(object sender, EventArgs e) { for (numCounter = 0; numCounter < ...
1
vote
1answer
36 views

Threads and logfiles

The c# newbie is back :) I have another problem with my threads. Here is what i am trying to achieve: I am starting 5 threads which are performing the same task but on different URLs. So i am keeping ...
1
vote
1answer
47 views

ReentrantLock with priorities for waiting threads

I am trying to have a ReentrantLock with another way to determinate which thread will have the lock in the waiting queue. ReentrantLock implementation manages a Fair/Unfair policy, that's not what I ...
1
vote
0answers
32 views

Implementing buffered channels in Guile

I was looking for a way of doing simple message passing in Guile and found some references to the module (ice-9 occam-channel) which is a pretty nifty, but undocumented, module for occam-like ...
1
vote
3answers
62 views

Generate consecutive sentence of int values accessed from different threads

I need to generate consecutive sentence of int values: 0, 1, 2, ... But I need to access them from different threads. So I wrote such code: class Counter { private static Counter instance = new ...
1
vote
0answers
26 views

Memory/Threads leaks, developing simple HTTP-server with WinSock2 [closed]

I begin to develop my tool, which works with net at the TCP level, which will present simple functions of web-server. In testing my program I have got very bad mistakes: Memory leaks Creating ...
-1
votes
1answer
53 views

How keep the jQuery animate() function running without “crashes/locking” with my code executing at the same time? [closed]

I'm building a game that has a progress bar for the remaining time, but when user do a action, the progress bar does not remain stable at the same speed. This action uses much of ...
2
votes
1answer
108 views

What's the motivation for multi-threading in this code?

Here are two ways for writing this sample code (one using multi-threading, one without using multi-threading) - The original code (friend wrote it) uses multi-threading. I would like to know which ...
1
vote
1answer
89 views

Timer wrapper review

I used this code in several projects. But I am not sure if it is stable. However on production it is working well, but I want to listen your advices: /// <summary> /// Standard abstract parent ...
2
votes
2answers
129 views

Is this method thread safe?

Are these methods getNewId() & fetchIdsInReserve() thread safe ? public final class IdManager { private static final int NO_OF_USERIDS_TO_KEEP_IN_RESERVE = 200; private static final ...
4
votes
2answers
123 views

Did I need to use lock to ensure that Queue.Dequeue is Thread Safe in this case on .NET 2.0?

Is this ok? I am using C# and .NET 2.0 I have this Queue declared in my class : static private Queue<SignerDocument> QUEUE = new Queue<SignerDocument>(); I fill this Queue with some ...

1 2 3 4 5 6
15 30 50 per page