The tag has no wiki summary.

learn more… | top users | synonyms

27
votes
3answers
5k 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
707 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 ...
10
votes
1answer
246 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 ...
9
votes
3answers
4k 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 ...
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: ...
4
votes
6answers
331 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 ...
4
votes
2answers
361 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 ...
4
votes
2answers
562 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, ...
3
votes
1answer
444 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 ...
3
votes
1answer
325 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 = ...
2
votes
2answers
297 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
vote
8answers
771 views

Why does the instruction “do” require a “while”?

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 ...
1
vote
3answers
466 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
3answers
249 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 ...
0
votes
2answers
175 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, ...
0
votes
2answers
165 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 ...
0
votes
1answer
188 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
628 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 ...
-1
votes
2answers
713 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
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 ...
-2
votes
2answers
190 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 ...