The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
70 views

Snmp Poller in java Single and Multiple thread [on hold]

I'm trying to make a Network Management System application. For the polling, what is better, single thread for all devices or multiple thread (i.e. individual thread for an individual device)? My ...
4
votes
2answers
255 views

Is it better to create thread safe subclasses or make the main class thread safe?

Say we have a class that is frequently used in a single-thread context: public class Foo { public List<Bar> Data; public virtual void ChangeData() { for(var i =0; i < ...
3
votes
6answers
426 views

Why are threads called threads?

I understand that a process a unit of resource ownership and executable instructions. Threads allow a process to share its resources with multiple executions, and it's easier for an OS to schedule ...
9
votes
1answer
2k views

Are go-langs goroutine pools just green threads?

The commentator here offers the following criticism of green threads: I was initially sold on the N:M model as a means of having event driven programming without the callback hell. You can write ...
0
votes
10answers
951 views

Why does the instruction “do” require a “while”? [closed]

Since this statement is so common: while (true) (Java) or while (1) (C) or sometimes for (;;) Why is there not a single instruction for this? I could think that an instruction that could do it ...
4
votes
2answers
723 views

Managing threads in Java with a good pattern

This morning I began writing a minimal chat using Java socket and threads but it took some minutes for me to experience a lot of problems in the MVC management. Currently I have 3 classes: Main, ...
-1
votes
2answers
204 views

When will be safe to choose Multi-thread design without dead lock? [closed]

Sometime we really need to choose a multi-threaded design, because single-threading will block the UI or block another thread. But sometimes using multiple threads is just one of the choices, for ...
0
votes
2answers
182 views

Queues and threading

I am developing a new project where I will be constantly checking a webpage for data and adding this data to a queue for processing. This data will then be removed from the queue and added to a list ...
31
votes
3answers
7k views

Is GCC dying without threads support on Windows?

I need some opinion. GCC was always a very good compiler, but recently it is losing "appeal". I have just found that on Windows GCC does not have std::thread support, forcing Windows users to use ...
13
votes
1answer
853 views

Best practise is not to poll…but isn't polling happening internally anyway when a thread calls wait()?

Say we have some thread that wants to check when another thread is finished its task. I have read that we should call a wait() type function that will make this thread wait until it receives a ...
5
votes
2answers
469 views

Allow threads (in c) to print messages without interfering with user input

I'm a writing a small webserver for personal use in c (not c++). I want to allow user input in the console like "shutdown server" or "restart server". In order to allow this kind of input the server ...
1
vote
1answer
197 views

What makes a series of machine instructions an actual process/thread in memory?

Every instruction comes from main memory/RAM. In a bootloader, at least on Intel and IBM PC firmware and designations, you have BIOS jump to a memory address to begin fetching instructions for ...
0
votes
2answers
181 views

How bad would it be to obtain a lock on every object?

Imagine a hypothetical programming environment that is largely like Java or .NET, i.e. object-oriented, garbage-collected, etc., but with one small change: Every time you call a method on an object, ...
-1
votes
2answers
899 views

Should I use simple socket programming to communicate between 2 threads? [closed]

Is it a good idea to communicate between 2 threads using sockets in Java? What I am trying to achieve is Inter-process communication using socket programming/RPC mechanism.
1
vote
3answers
301 views

Inter-process and inter-thread data sharing [closed]

I know that operating systems facilitate inter-process and inter-thread data sharing. I want to know about the mechanisms used to facilitate such sharing. I read about "pipes". What are the other ...
13
votes
3answers
8k views

What is a thread pool?

In an interview question a guy was asked to "implement a threadpool"... I've been reading on wikipedia for "threadpool" but I still can't figure out what should a guy do to solve this question ...
2
votes
2answers
578 views

What is the difference of delegator and dispatcher?

What is the difference of delegator and dispatcher? I am not quite sure of either concept.
-1
votes
1answer
1k views

What happens at control invoke function?

A question about form controls invoke function. Control1 is created on thread1. If you want to update something in Control1 from thread2 you must do something like: delegate void ...
1
vote
3answers
625 views

Algorithm for appointment reminders

My program allows users to store appointments in a calendar. What has been requested of me is the ability for SMS reminders to be sent to people to remind them of their appointment. The SMS would ...
1
vote
2answers
887 views

Google Maps-based desktop application [closed]

I want to build a desktop application which has google maps embedded to it. This app should have a thread to read coordinate data online a usb microphone to use. This application will move the google ...
3
votes
1answer
374 views

Is a readonly field in VB.NET thread safe?

Is a readonly field in VB.NET thread safe? For example, see the code below: Class Customer ReadOnly Name As String ReadOnly ZIP As Integer = 98112 Sub New(ByVal Name As String) Me.Name = ...
7
votes
5answers
2k views

Do threads use virtual memory or real memory?

I was trying to optimize my Linux server to handle 10,000 threads per process while it does just 382 right now. As per this article the following formula is used to find out total possible threads: ...
10
votes
1answer
255 views

Drawing thread interaction

I'd like to draw (pen and pencils) threads interaction in a UML(-like) notation. I don't insist on UML, anything that is obvious to the reader should do. I started with sequence diagrams, but I don't ...