8
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 ...
-1
votes
2answers
200 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 ...
13
votes
1answer
828 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
438 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 ...
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 ...
3
votes
1answer
361 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 = ...